Help With Restoring

Mike Rubel mrubel at galcit.caltech.edu
Thu Jan 9 03:49:00 EST 2003


> rsync --delete --stats --compress --recursive --times --perms --links 
> --rsh=/usr/bin/ssh --exclude "tmp/" --exclude "dev/" --exclude "proc/" 
> --exclude "backups/ " --delete-excluded --backup 
> --backup-dir=/backup2/BACKED_UP_SERVER_FQDN/$DAY -a /* 
> CENTRAL_SERVER_IP:/backup2/BACKED_UP_SERVER_FQDN/current && echo "Daily 
> backup ran on `date`" >> /var/log/backup.log 

Notice that if you have any dotfiles in / (that is, flies that begin with
a "."), this will not copy them, but normally you wouldn't have dotfiles
in / so it shouldn't matter.  Might want to start using / instead of /*
from now on though, just for good form.

> This has been working fine and I've even been able to restore files using 
> scp from time to time. now I'm faced with a bare metal recovery cause of a 
> botched upgrade from Redhat 7.1 to 8.0 that failed half way through. This 
> machine was still accessible via console and ssh (putty). I signed in via 
> ssh and ran... 
> 
> # cd / 
> # scp -r CENTRAL_SERVER_IP:/backup1/BACKED_UP_SERVER_FQDN/current/.* . 
> 
> This was running for a while and then i lost my connection and cant 
> reconnect. I won't have console access till the morning but any advice 
> would be greatly appreciated.

Don't you mean:

scp -rp CENTRAL_SERVER_IP:/backup1/BACKED_UP_SERVER_FQDN/current/. .

?

The command you list above won't copy anything, since there are no
dotfiles in the root directory.  Also, you have backup2 in the rsync
command and backup1 in the scp command.

Maybe that was just a typo though...

One final thought.  Sometimes scp has issues with symlinks (as in, copying
the target instead of the link).  Might want to use:

cd /
rsync -av CENTRAL_SERVER_IP:/backup1/BACKED_UP_SERVER_FQDN/current/ .

Mike




More information about the rsync mailing list