Skip to content

A simple configurable python script that archives files in folder that are older then configurable number of days.

License

Notifications You must be signed in to change notification settings

pawandeepthind/archiver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

archiver

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,

configuration

  • 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

process

  1. 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
  2. Reads the folders from configuration, and collects files that are older then configurable number of days and compress them.
  3. Remove the files once archived (controlled by a configuration)

About

A simple configurable python script that archives files in folder that are older then configurable number of days.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages