Script for creating filesystem snapshots.
This script creates snapshots of the desired directories. When it is run, it mirrors the most recent backup and syncs any changes made since then. This allows you to see the system as it was in that moment of time. To minimize space used, the script mirrors with hard links.
By default, the script backs up these root directories: /boot
/etc
/home
/opt
/root
/usr
Note: To back up directories that the user does not have permission to or to back up to a directory where the user is not allowed to write, the script needs to be run with superuser permissions.
-c
Encrypted drive to open and use (Required if-d
is not specified)-d
Base directory where all backups are stored (Required if-c
is not specified)-h
Usage screen-v
Verbose mode
0
Backup completed successfully1
Backup failed2
Invalid argument passed
For general usage:
rsync
If using an encrypted drive:
crypt