baumi's blog

baumi's personal blog … Linux, OS X, Windows, Random things, …

Debian GNU/Linux: Setting up autofs/sshfs/rsync/rsnapshot for Hetzner Storagebox backups:

1) set up sshfs public key authentification (sshfs connect wihout password): http://wiki.hetzner.de/index.php/Backup_Space_SSH_Keys/en

2) set up sshfs, autofs + rsync http://blog.no-panic.at/2015/04/14/my-backup-strategy/

troubleshooting:
autofs with sshfs is working nicely for me. automounting the loop image inside sshfs was buggy for me, but actually isn’t necessary at all. – i’m simply using autofs/sshfs for mounting the storagebox, then manually mounting the backup.img from my backup script, which looks like this:

mount /mnt/sshfs/storagebox/backup.img /mnt/backup/
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found/","/mnt/*"} /var/mail/ /mnt/backup/var/mail/
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found/","/mnt/*"} /home/ /mnt/backup/home/
date > /root/storagebox_backup.log
umount /mnt/backup/

p.s. the rsync stuff is a quick test, our real backups are done with rsnapshot to keep multiple revisions …

Comments are currently closed.