[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

fun Re: Copy Linux Filesystem/Check/Compare Filesystems




On Fri, 21 May 2004, Silvan wrote:

> On Wednesday 19 May 2004 07:20 pm, Doug MacFarlane wrote:
..
> > Any suggestions?  Just exactly how would one tar one filesystem to another,
> > without the intermediate tar file?

mount /new-disk /mnt/new
-- abort -- abort if failed
tar cf - /home /var /whatever-you-want | ( cd /mnt/new ; tar xvfp - )
umount /mnt/new

	- you can figure out what directories to cp over and which ones yu
	don't touch
	( /tmp, /mnt, /proc .. )

> 
> if ! (mount /mnt/backup); then
>     echo "ERROR!  Could not mount /mnt/backup!"
>     echo "Abort, abort, abort!!!"
>     exit 1
> fi

good to manually mount backups ... :-)
 
> rsync -uax --delete / /mnt/backup/
> rsync -uax --delete /boot /mnt/backup/
> rsync -uax --delete /var /mnt/backup/
> rsync -uax --delete /home /mnt/backup/

wouldn't the first rysnc of "/" backup everything including /boot, /var...
	- and worst still, rsycing of /tmp and /proc is a very bad idea

	which means you manually list all the directories you do want 
	rysnc to the other box


and i dont like --deletes, just in case i delete a directory/file 
and a week later, i decide, oh shit, wish i had that file from last
week or last year

and nope, i dont use rsync ... except to d/l and [r]sync other peoples
stuff like kernel.org locally

c ya
alvin



Reply to: