A stupidly barebones backup script for UNIX systems (or just a marginally smart
How do I use it?
/etc/simplebackupand give the user running
simplebackup.shread and write permissions on it.
- Update the
backup_drivevariable in the conf file to match the mount point of your backup drive.
- Optionally update the
--excludeflag in the
rsyncinvocation in the
simplebackup.shscript to your needs.
- Create the
/var/log/simplebackup/directory and give the user running
simplebackup.shwrite permissions on it.
- Place the
simplebackup.shscript somewhere it won't get accidentally deleted.
(sudo)? crontab -eto run this script periodically.
Boom, you're done, logging and all!
Simplebackup creates a
/etc/simplebackup/statusmessage file which gets
chowned to the
user_to_notify from the
sbckup.json conffile. This can be
used (by putting a call to
cat in your runtime config) to notify you, using
colorized messages) of the status of a backup: these can be any of:
- In progress
- Failed or interrupted
- Successfully completed
This message will also alert you if it's been more than 48 hours since the last successful backup (WIP, it's implemented but more than a bit broken for now).
This script is based off the
rsync invocation posted to ArchWiki
wrapper around this central part of this script was originally authored by Jules
Mazur and is released under the GNU General Public License, version 3 (GPLv3).
Details about this license may be found in the
LICENSE file in the root of
- Backup lapse reminders (GNOME/KDE integration)
- Verification that the backup medium has enough free space to actually store a new backup
- Support for archived incremental backups (sort of like what Time Machine does,
where you can pick and choose from older backups using stored diffs or
something of the sort)
- Support for restoring from those backups
- Support for automated restores on Arch, including updating
/etc/fstab, if that's even possible (it's once again past 3 AM and for some reason I'm still working on this, so I can't really say off the top of my head)