Tuesday, June 21, 2005

Filesystem Copy

Hey;

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}

HTH;

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.

bash:

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

copy to remote machine using ssh
bash:

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

Using cpio command
bash:

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
Guest


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

bash:

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

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

#Remote Copy
$rsync --verbose --progress --stats --recursive 192.168.0.2::hdd/ .

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
ng/tmp/rsync-2.6.3/main.c(1146)

#rsync over ssh:

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

To copy tared zipped file from remote machine.

This command transfer file faster than scp command

bash:

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

0 Comments:

Post a Comment

<< Home