Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
03-02-2014, 09:44 AM
|
#1
|
Member
Registered: Jul 2008
Location: Indiana
Distribution: Fedora, Ubuntu, Slackware
Posts: 203
Rep:
|
Moving large amount of data to another drive
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?
|
|
|
03-02-2014, 10:06 AM
|
#2
|
Member
Registered: Feb 2009
Location: 192.168.x.x
Distribution: Slackware
Posts: 852
|
I would probably consider using rsync.
|
|
2 members found this post helpful.
|
03-02-2014, 02:48 PM
|
#3
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,363
|
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 ... 
|
|
1 members found this post helpful.
|
03-02-2014, 07:30 PM
|
#4
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
|
Regardless of the OS in use, as stated above, always copy then verify then, when you are sure the data is copied in full, delete the original.
|
|
1 members found this post helpful.
|
03-03-2014, 06:23 PM
|
#5
|
Member
Registered: Sep 2009
Location: Los Angeles, CA
Posts: 33
Rep:
|
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 
|
|
1 members found this post helpful.
|
03-04-2014, 02:45 PM
|
#6
|
Moderator
Registered: Mar 2008
Posts: 22,360
|
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.
|
|
1 members found this post helpful.
|
03-04-2014, 02:59 PM
|
#7
|
Member
Registered: Jul 2008
Location: Indiana
Distribution: Fedora, Ubuntu, Slackware
Posts: 203
Original Poster
Rep:
|
Quote:
Originally Posted by jefro
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.
|
|
|
All times are GMT -5. The time now is 04:58 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|