Re: Copy Linux Filesystem/Check/Compare Filesystems
On Wednesday 19 May 2004 07:20 pm, Doug MacFarlane wrote:
> Team:
>
> I will shortly need to copy about 100 gb of data from one filesystem to
> another. While cp would probably do fine, others have suggested using tar
> or some other tool that is more robust for performing the copy.
>
> Any suggestions? Just exactly how would one tar one filesystem to another,
> without the intermediate tar file?
I don't think anyone has suggested rsync yet. Its syntax is awful, but if you
flip through the man page, I think you'll agree it has a lot of potential to
do everything you want.
FWIW, I use it to back up a 40 GB drive every night. Just a cheap little
thing like this:
if ! (mount /mnt/backup); then
echo "ERROR! Could not mount /mnt/backup!"
echo "Abort, abort, abort!!!"
exit 1
fi
rsync -uax --delete / /mnt/backup/
rsync -uax --delete /boot /mnt/backup/
rsync -uax --delete /var /mnt/backup/
rsync -uax --delete /home /mnt/backup/
umount /mnt/backup
Looking at this, you may wonder why the extra trouble to tell it to limit
itself to one filesystem when there's only a single destination. The reason
is because there used to be separate destinations, and I haven't bothered to
tinker with the script to see about doing everything in one shot. If it
ain't broke...
--
Michael McIntyre ---- Silvan <dmmcintyr@users.sourceforge.net>
Linux fanatic, and certified Geek; registered Linux user #243621
http://www.geocities.com/Paris/Rue/5407/
Reply to: