|Elisa c004a53a3a Automatically remove empty backup dirs||9 months ago|
|README.md||9 months ago|
|bkp.sh||9 months ago|
Btrfs and rsync - based backup system
/path/to/base/dir ├─bkp.sh └─BkpTargetDir ├─ignore.lst: list of ignored subdirs/files (shell wild cards accepted), optional ├─sources.lst: source directory(ies) to backup from (can be over ssh, and can be multiple) └─YYYY
└─mm └─dd ├─HH:MM:SS └─HH:MM:SS
Just run bkp.sh with the BkpTargetDir as argument (you can specify many at once).
If there is no backup yet, it will create a sub-volume, or else it will first make a snapshot of the previous sub-volume (the most recent one) and rsync on top of it, so that only modified blocks will be saved onto the disk, and the whole tree is entirely accessible via standard system tools (file manager, ls / cd, etc).
Watch out for owner/group : if rsync needs to chown files after syncing them (multiple trees with different owners, a file system root for example) you will absolutely need to run the script as root.
Otherwise, if you have total write permission on the file system, you'll be able to make sub-volumes and snapshot as if they were normal directories (but not delete them).