Tuesday, June 21, 2005

Filesystem Copy


I'm involved in a very similar project at my current client. For
filesystems, we're using a combination of find and cpio. You don't
want to use mv as that eliminates your backout plan. cp and tar
are both too slow for any serious data migration. I have a cohort
that swears by ufs|vxfsdump; however, I've not been able to get
verifiable results using it. I'm sure it's something I'm messing
up; however, it wasn't worth fighting over. On HP systems, using
fibre channel on EMC devices, we were getting over 200 gig per hour
transfer rate. I understand the SUN systems are getting similar
transfer rates.

The exact command is:

cd ${mp}; find . -xdev -print | cpio -pdumv /mnt${mp}


PostPosted: Mon Oct 04, 2004 9:59 pm Post subject: copy files using
tar/cpio/rsync command Reply with quote
We can use the following tar command to copy the files.


( tar cfp - ./imap ) | ( cd /var/spool/ ; tar xfp - )

copy to remote machine using ssh

$ ( cd /to/directory/to/copy && tar cf - . ) |
ssh user@remote_machine "(cd /directory/to/copy/to && tar xvpf - )"

Using cpio command

find . -depth | cpio -pdumv /path/tobe/copied/to

Last edited by admin on Thu Feb 03, 2005 1:46 am; edited 7 times in total
Back to top
View user's profile Send private message Send e-mail

PostPosted: Mon Oct 11, 2004 12:10 pm Post subject: rsync copy
Reply with quote
To copy file incrementaly. we can use rsync comand


#Local copy
$rsync -vrulHpogtSx /local /apps/

$rsync -vrulHpogtSx --delete /local /apps/

#Remote Copy
$rsync --verbose --progress --stats --recursive .

Number of files: 278109
Number of files transferred: 240181
Total file size: 4492470951 bytes
Total transferred file size: 4463367304 bytes
Literal data: 4463366090 bytes
Matched data: 1214 bytes
File list size: 5691994
Total bytes sent: 4812050
Total bytes received: 4480019189

sent 4812050 bytes received 4480019189 bytes 489209.84 bytes/sec
total size is 4492470951 speedup is 1.00
rsync error: some files could not be transferred (code 23) at /home/lapo/packa

#rsync over ssh:

$/usr/bin/rsync -e ssh -avz --delete Expect-1.15 guest@

To copy tared zipped file from remote machine.

This command transfer file faster than scp command


ssh <host> -x "cat file.tar.Z " | zcat - | tar xvf -


Post a Comment

<< Home