A simple configurable python script that archives files in folder that are older then configurable number of days.
Script can be configured, using the archiver_config.json file. Some of the important flags in the confiigurable files,
- debug - boolean - enable more verbose flags
- remove_files - boolean - removes the original files once they are achived
- archival_days - int - files older then these days will be archived when the script runs
- archival_folder_name - _string - folder name in the current directory where the archives will be created
- log_file_name - _string - file name for the log file
- enable_disk_space_check - boolean - flag enables archiving only if used disk is above a limit set in configuration disk_space_check_percentage_limit
- disk_space_check_percentage_limit - int - limit of used space when crossed, files older then archival_days will be archived
- disk_path - string - path to find out the disk usage
- folders - List of folder with following properties that enables archiving multiple folders
- path - string - folder path to check files for archiving
- description - string - just the description of the folder used for displaying information
- archive_name_prefix - string - Archive file name prefix
- Checks if we have enabled disk check (if used disk is above a limit set in configuration, then it will compress and archive the files in a folder in current directory
- Reads the folders from configuration, and collects files that are older then configurable number of days and compress them.
- Remove the files once archived (controlled by a configuration)