Remote server backup (using dump and ssh)
Sunday, May 21st, 2006I figured out how to quickly make a backup of my server:
ssh user@server "sudo dump -0 -f - /bin /boot /dev /etc/ /home /initrd /lib /opt /root /sbin /usr /var" > backup<date>.dump
The only problem is that dump does not easily allow you to exclude stuff (so I had to resort to moving things I do not want to backup to /nobackup and not listing it. Also, this solution works if sudo doesn’t ask for a password (you may need to open another sudo for that).
I had to use sudo as I do not allow direct remote root access.