Im currently running a Linux desktop, the other day the disk become corrupt and I lost my home area. Not a big problem as I dont store much data, but I lost all my ssh keys, configs etc. It took a few days to recover.
In an effort to stop that from happening again I want to backup all my data to the company file server, but I dont want them to have access to my keys and configs ect.
So I have scripted a backup which will encrypt on the fly. Through it into cron and you have a daily backup.
This is the command you run to create backup, notice the password is in the command. This is allow for automated backups using Cron.
1 |
tar -czf - /home/username/* | openssl enc -e -aes256 -pass pass:password -out /mnt/backupmount/backup.tar.gz |
And the following command is to run a restore, once executed you will be prompted for the password.
1 |
openssl enc -d -aes256 -in /mnt/backupmount/backup.tar.gz | tar xz |