🔍 See Original Answer on Ask Ubuntu 🔗
Is it necessary to keep records of my backups?
January 20, 2018
Edited: June 12, 2020
November 24, 2022
Copy to clipboard: false
I started doing daily backups about six months ago to my email account at gmail.com. gamil limits email backups to 25 MB per archive. The “free” account is limited to 15 GB and is currently 14% full. Soon I will have to start sifting through the archives with a backup strategy to keep:
- Monday to Sunday (Daily backups) that get purged after 14 days
- Sunday backups (Weekly backups) purged after 8 weeks
- Last day of month backups (Monthly backups) purged after 18 months
- Last day of year backups (Yearly backups) kept forever
The backup strategy follows the Grandfather-father-son theme.
Writing a script to access a gamil.com account to copy an existing daily backup to a Weekly backup, Monthly backup and/or a Yearly backup based on date will be no easy task. It might be easier to email the backup multiple times, depending on date, to create the Weekly, Monthly and Yearly backups in real time instead of copying them in the future.
The script to manage Weekly, Monthly and Yearly backups has to account for the fact a backup may not be available for Friday of week, Last day of Month or Last day of Year in which case the next earlier backup has to be selected.
Finally a script to purge Daily, Weekly and Monthly backups based on expiry dates has to be written.
Until script(s) are written, manual copying and renaming of backup archives is required.
Large backups of say 60GB of music files will be a separate process to a large enough USB stick or pair of alternating USB sticks.
Programs are not backed up but a list of installed programs (package names) is backed up daily.
It is extremely important that you test your backups from time to time. You can do this by restoring them to an empty partition and then running
diff command between the backup restored partition and real partition.