Question about Backing up with tar

Andrew Haley aph at redhat.com
Thu Dec 10 11:05:39 UTC 2009


kevin wrote:
> I would like to know if this will work with fc9:
> 
> # sudo su
> # cd /
> # tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found 
> --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /
> 
> 
> 
> What I really want to know is this. I have two systems that are 
> identical and would like to just copy one to the other and keep all 
> permissions for each of the files and folders copied. Is this feasible 
> or could someone point me to the right direction with some kind of tutorial?

tar isn't going to do it: tar can't cope with files that have holes, for one
thing.  You have to be careful with mount points too.

Something like this will work:

  umount the file systems
  mkfs the new filesystem.  mount it
  dump 0f - /dev/filesystem | ssh foobar -c 'cd /restorepoint && restore rf -'

Andrew.




More information about the fedora-list mailing list