RHEL 5 copy large directory


I have a production RHEL 5 server with a folder that I need to copy to a NAS appliance. Problem is that the RHEL 5 folder is very large with many files (180GB+/121,000 Files). Any one have the easiest/most reliable method to copy that folder to a NAS appliance that has already been setup (A Buffalo Duo Link NAS with 2 HDs in RAID 1)?

Vincent DAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Monis MontherSystem ArchitectCommented:
How do you access the NAS is it mounted on your RHEL as NFS, or as Direct mount point??

I Recommend to use rsync

rsync -avP --stats source destination

This will copy the files and dirs preserving permissions and providing statistics at the end, also in case the copy stopped for any reason before it finishes you can continue from where you stopped without repeating what previously has been copied.

Also for future copies it will only copy new changed and added files

Kerem ERSOYPresidentCommented:

I'll suggest you to use rsync. Rsync is a very powerful tool  you can also make incremental copes and transfer only the modified files to the remote nas. It also supports transfers over SSH and it is all you need.

rsync -ave ssh --numeric-ids --delete  /data/local nas:/data/remote

A command similar to above copies all your files to the other end. and it will run in incremental mode if run on a later date once the initial operatin has benn completed.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
just a couple of comments on rsync
- it'll require rsync on the target, either as a daemon, or as a binary executable
- if not running as a daemon, it'll require some other communication protocol that you can connect over, such as ssh as suggested by KeremE
- lastly, depending on the network speed, you /may/ benefit by adding the -z compression flag to the rsync copy
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.