- When playing Neofly in Microsoft Flight Simulator, the Neofly app saves the progress to one file only and replace the old one. I want to have a history of saved files, in case I need to restart the progress after crashing the plane.
- I was able to do it manually (by renaming the file), but why not to have an automated agent that can copy the file to a backup location and rename it, according to timestamp
- Agent will be able to monitor a
folder
for aspecific file pattern
. When there is anew file
(eg file that was not backuped yet), it creates a copy of that file in abackup folder
with a new name, created asorig_file_name_without_ext_YYYYMMDD_HHMMSS.orig_extension
- In order to keep the load on the system low, it should check new files only every
sleep_time
seconds - Configurable items
- monitored_folder
- monitored_pattern
- backup_folder
- sleep_time
- Logging to the log file (no more debug prints)
- The configuration will be done through json file
- The name of config file or the section in the file can be parametrized through cmdline
- All configuration parameters through cmdline
- Agent will monitor several folders
pip install appconfig-json
### Alternatively, use test channel
### pip install -i https://test.pypi.org/simple appconfig-json -U --no-cache-dir
Run the application from client
folder and specify current group from your config file or other params.
Example:
python tm_app.py -v=INFO -g=prod
python cryptorshell.py encryptdir Q:\dev\_projects\github\simple_timemachine\client\config Q:\dev\_projects\github\simple_timemachine\client\config\encrypted --pattern private* --pubkey simple_time_machine.pub.pem