tag: backup

A Bash One Liner For Backing Up Files

Here it is: tar --create --xz --file backup.tar.xz backuptest.md && passphrase=$(echo $RANDOM | sha256sum | head -c 64) && sudo gpg --symmetric --batch --yes --passphrase $passphrase backup.tar.xz && echo backup.tar.xz $passphrase >> /path/to/log/location/backup.log && rm backup.tar.xz && rsync -avz ./backup.tar.xz.gpg ./backup_location/ ...