[SOLVED] Moving large amount of data to another drive
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Maybe I am overthinking this but I am curious as to the best way to move a large amount of data to another drive. I am adding a drive to a file server and need to move about 500gb worth of data. I searched around a bit and didn't find anything relevant so perhaps it is as simple as it seems.
If I were moving files on the same filesystem, obviously I would just use mv. I don't know how long it will take to move this much data between drives but I assume it would be a while and the system is at the mercy of the power grid, and I don't know if using mv would be safe in the case of power interruption. Does it copy the entire group of files and then delete them, or does it delete them as it goes? I guess the question is mv the same as a manual cp then rm? I am not cloning the entire drive, just moving some of it. What is the standard way of doing this in a professional environment where data loss is unacceptable?
To answer the underlying question, don't use mv. cp or rsync give you a "free" backup you can delete at your leisure.
You can never have too many backups when moving (important) stuff around ...
I would NFS mount, use tar or rsync to COPY (not move). Run an md5hash on each file and compare to make sure all copies are pristine before you delete from the original server.
tar is preferred over cp because it is better at preserving symbolic links and other file attributes. I think cp did not preserve symbolic links. I don't recall how well rsync's preservation works. Probably fine, but I remember the tar arguments better
byau and 273 brings up a good point about holding data until verified. Rsync or some version is a great way to consider.
If this is a live state copy then you may need to stop access to the drive and then copy it. There are only a few ways to copy live state data and keep it all concurrent.
byau and 273 brings up a good point about holding data until verified. Rsync or some version is a great way to consider.
If this is a live state copy then you may need to stop access to the drive and then copy it. There are only a few ways to copy live state data and keep it all concurrent.
We assume you have a local disk to disk transfer.
Yes, local disk to disk transfer. rsync seems to be the best way to go. Thanks everyone.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.