Backup over the internet.

Mike Tancsa mike at
Tue Jul 15 05:24:39 PDT 2003

Something piped through ssh using DSA keys.


on the machine which you want backed up (client) to the machine where the 
backup file lives,

client machine:
su root
# if you have not yet created your ssh keys, do so now
ssh-keygen -d

on the server machine,

pw useradd clientmachineid -m
su clientmachineid
cd ~clientmachineid
ssh-keygen -d
cd .ssh
# from the client machine, put the root's and ONLY the .pub file 
here under the name authorized_keys2

#on the client machine,

ssh clientmachineid at server

#if all goes well, you will login without a password.

Now the backups.

If you need to preserve file access times and want to do incremental 
backups, use dump. If you dont care about munging file access times, and 
its just simple files, tar will work.

/sbin/dump -0uan -f - / | gzip -9 | /usr/bin/ssh -2 -c blowfish 
clientmachineid at dd 

/usr/bin/tar -cpzf - /usr/local/etc /etc/mail/ | ssh -c blowfish 
clientmachineid at "cat - > 
/pathtohomedirectory/clientmachineid/backup.`date "+%d"`.tgz"

Blowfish is a bit faster than the others so I specify it.


At 09:08 AM 7/15/2003 +0000, DanB wrote:
>What is the easy way to back up over the internet? What software should
>be used?
>freebsd-questions at mailing list
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

Mike Tancsa,                          	          tel +1 519 651 3400
Sentex Communications,     			  mike at
Providing Internet since 1994          
Cambridge, Ontario Canada

More information about the freebsd-questions mailing list