Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #247337 > unrolled thread
| Started by | Adriel Peng <peng.adriel@gmail.com> |
|---|---|
| First post | 2022-04-18 06:20 +0200 |
| Last post | 2022-04-18 10:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.debian.user
moving dir with lots of files Adriel Peng <peng.adriel@gmail.com> - 2022-04-18 06:20 +0200
Re: moving dir with lots of files Bijan Soleymani <bijan@psq.com> - 2022-04-18 06:30 +0200
Re: moving dir with lots of files Keith Bainbridge <keithrboz@gmail.com> - 2022-04-18 10:50 +0200
| From | Adriel Peng <peng.adriel@gmail.com> |
|---|---|
| Date | 2022-04-18 06:20 +0200 |
| Subject | moving dir with lots of files |
| Message-ID | <Edr1L-9tV5-1@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hello I plan to move a dir which has about 0.4 million files to a new location. This new location is a network storage. I will run the command: nohup mv dir /mnt/disk/newdir I guess this will take a lot of hours to finish. My question is, if the process gets an unexpected interruption, what will happen and how can I recover it? Thanks.
[toc] | [next] | [standalone]
| From | Bijan Soleymani <bijan@psq.com> |
|---|---|
| Date | 2022-04-18 06:30 +0200 |
| Message-ID | <Edrbr-9u3z-3@gated-at.bofh.it> |
| In reply to | #247337 |
On 2022-04-18 00:16, Adriel Peng wrote: > Hello > > I plan to move a dir which has about 0.4 million files to a new > location. This new location is a network storage. > > I will run the command: > > nohup mv dir /mnt/disk/newdir > > I guess this will take a lot of hours to finish. > > My question is, if the process gets an unexpected interruption, what > will happen and how can I recover it? > > Thanks. If you can afford not to do a move but a copy and then a delete, then I would recommend using rsync rsync will transfer what is missing if interrupted If there is nothing missing it will finish pretty quickly. I sync 130GB in 1.4 million files over the internet regularly and if there are no changes it take about 20 seconds to finish (the disks are fast on both ends). If there are changes it transfers about as fast as the network can go. Bijan
[toc] | [prev] | [next] | [standalone]
| From | Keith Bainbridge <keithrboz@gmail.com> |
|---|---|
| Date | 2022-04-18 10:50 +0200 |
| Message-ID | <Edvf3-9wux-1@gated-at.bofh.it> |
| In reply to | #247338 |
On 18/4/22 12:24, Bijan Soleymani wrote: > On 2022-04-18 00:16, Adriel Peng wrote: >> Hello >> >> I plan to move a dir which has about 0.4 million files to a new >> location. This new location is a network storage. >> >> I will run the command: >> >> nohup mv dir /mnt/disk/newdir >> >> I guess this will take a lot of hours to finish. >> >> My question is, if the process gets an unexpected interruption, what >> will happen and how can I recover it? >> >> Thanks. > > > If you can afford not to do a move but a copy and then a delete, then I > would recommend using rsync > > rsync will transfer what is missing if interrupted > > If there is nothing missing it will finish pretty quickly. > > I sync 130GB in 1.4 million files over the internet regularly and if > there are no changes it take about 20 seconds to finish (the disks are > fast on both ends). > > If there are changes it transfers about as fast as the network can go. > > Bijan > I have found that rsync -avHb --remove-source-files dir /mnt/disk/newdir moves files in one process. If it is interupted, re-running will simply pick up where it was halted. -- All the best Keith Bainbridge keithrbaugroups@gmail.com
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web