Fast copy of files with tar

Fast copy of files with tar
Today started with having to copy 100+ gigs of jpegs to a USB mounted drive. I ruled out two obvious choices right away.

– cp: too slow

– rsync: No point, this was a first time copy so I know everything needs to be copied.

The post shows how to use netcat and tar to send files server-to-server at an more than acceptable rate. The post reminded me of something similar I had done a while ago for disk-to-disk copies. It goes like this:

# cd

# tar cf – | ( cd ; tar xf – )

For example:

# cd /data/images

# tar cf – | ( cd /mnt/usb/images ; tar xf – )

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.