this_could_take_all_night --------------------------------------------------------------------- # ... retention sensitive archiving (backup) for your pesky # mission critical data. # ... developed by penguins and snakes, for their own use # as well as the benefit of those living in worlds without # walls. # ... "You can turn it on, you can leave it on; # I don't care about the light. # Baby, this could take all night." # - Amanda Marshall --------------------------------------------------------------------- --------------------------------------------------------------------- COPYRIGHT THE FOLLOWING 08 LINES MAY NOT BE REMOVED, but may be appended with additional contributor info. this_could_take_all_night Copyright (C) 2011 V. Spinelli for SpinelliCreations. This program comes with ABSOLUTELY NO WARRANTY; as this program is based on [and has dependancies] the content of GPL and LGPL works, GPL is preserved. This is open software, released under GNU GPL v3, and you are welcome to redistribute it, with this tag in tact. ... http://www.spinellicreations.com A copy of the GPL should be included with this work. If you did not receive a copy, see... http://www.gnu.org/licenses/gpl-3.0.txt --------------------------------------------------------------------- --------------------------------------------------------------------- CONTACT Author V. Spinelli Email: Vince@SpinelliCreations.com Site: http://spinellicreations.com Handle: PoweredByDodgeV8 Copyright Holder SpinelliCreations Site: http://spinellicreations.com --------------------------------------------------------------------- README... --------------------------------------------------------------------- --------------------------------------------------------------------- REQUIREMENTS ------------ 1- Python version 2.6 or greater (http://python.org) - binary or compiled for Unix / Linux / Windows; we're cross platform friendly. 2- py-setproctitle library version 1.0 or greater (http://pypi.python.org/pypi/setproctitle) - Unix / Linux users only. - Other OS's, if you can't make setproctitle work for you, then set your OS "flavor" in the global options file as "WIN" to workaround. 3- Linux (Preferred) / Unix / BSD / Windows ... whatever ... 4- something to un-tar the backups with. - format is GNU TAR. - there are many many many compatible file archiving / unarchiving tools, but here are a few in case you need to find one: -- *Nix - file-roller http://fileroller.sourceforge.net/ -- *Win - 7Zip http://www.7-zip.org -- All - GNU Tar mainline http://www.gnu.org/software/tar/ INSTALL ------- 1- unzip / untar the package and copy to ... - /opt/this_could_take_all_night - c:\this_could_take_all_night - (actually, you can put it wherever you like, but this simply makes life a little easier). 2- edit the global options file (./options/options.opt)... NOTE - for first time installs, copy 'default_options.opt' over to 'options.opt' (new file) and then edit. # --------------------- RUNTIME ------------------------------------- [global_runtime] FLAVOR:UNIX # operating system # -- use UNIX for Linux, Unix, Solaris, BSD, etc, etc... # -- use WIN for Windows # --------------------- PATH ---------------------------------------- [global_path] BACKUPROOT:/mnt/backup # backup directory # ex. /mnt/backup TEMPDIR:temp # temp files go here # ex. temp (yields /mnt/backup/temp) BACKUPDIR:this_could_take_all_night # backup files ultimately end up here # ex. this_could_take_all_night (yields /mnt/backup/this_could_take_all_night) # ------------------------------------------------------------------- 3- copy preset file template (./options/presets/template.backup) and give it a new name (such as 'my_preset.backup') and edit... # --------------------- BACKUP-ROUTINE ------------------------------ [local_backup] REVISIONCOUNT:5 # -- number of 'old' copies to keep before deleting the # oldest file (rolling redundant backup system) UNIQUEID:MY_BACKUP_01 # -- unique id for all file generated by this particular # backup (such as the server name, ie. 'SKYWARP') BACKUP_SOURCE:/mnt/my_data # -- full path WITHOUT TRAILING SLASH of directory you wish # to backup (backups shall be recursive, so all subdirectories # are automatically included). # ex. /mnt/my_data # ex. C:\my_data RETENTIONTIME:4 # -- number of years to keep old records before deleting them # from the BACKUP_SOURCE path (this is also recursive). # ------------------------------------------------------------------- BACKUP ------ 1- [path-to-python]/python [path-to-tctan]/prog/this_could_take_all_night.py BACKUP [preset_name] NOTE - do NOT include the file extension in the preset name. ... for example: python /opt/this_could_take_all_night/prog/this_could_take_all_night.py BACKUP my_preset !WORKS! python /opt/this_could_take_all_night/prog/this_could_take_all_night.py BACKUP my_preset.backup !FAILS! HELP ---- 1- simply call "this_could_take_all_night.py HELP" and the help dialogue will popup. Welcome to this_could_take_all_night. ------------------------------------- This is a backup tool for flat data files on your workstations and servers, allowing you to unlink (delete) old files based upon your desired retention time (in years) and to roll your live data files into a backup location such as a network drive, removeable drive, or tape-backed-up folder location. BASIC USAGE... -------------- /path/to/python /opt/this_could_take_all_night/prog/this_could_take_all_night.py [ARGS] ARGUMENTS... ------------ this_could_take_all_night.py BACKUP my_backup_01 -- -- backup (recursively) folder defined in local options -- -- preset file (my_backup_01) this_could_take_all_night.py HELP (or -h , --help, help) -- -- brings you back to this help file any -- -- time you need a quick reference. --------------------------------------------------------------------- ---------------------------------------------------------------------