Full system backup with dar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Full system backup with dar. Refer to http://dar.linux.free.fr/doc/Tutorial.html | |
## Configuration | |
# path to store dar backup files | |
Storage=/mnt/disk/backup/Linux | |
# name of system | |
SysName=Ubuntu_`. /etc/os-release; echo ${VERSION_ID/*, /}` | |
# "-z2" - fast but weak compression | |
# "-Z" - do not try to compress these types of names (i.e. archives) | |
# "-P" - do not store contents of these directories. See documentation for more details. | |
sudo dar -c $Storage/linux-$SysName-root-full-`date +%Y-%m-%d` -z2 -D -R / \ | |
-Z "*.gz" -Z "*.bz2" -Z "*.zip" -Z "*.png" -Z "*.xz" \ | |
-P dev/pts -P sys -P proc \ | |
-P tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment