[mdlug] Copying files from one mounted drive to another mounted drive on Pi
Carl T. Miller
carl at carltm.com
Wed Mar 25 21:23:16 EDT 2020
Yeah, I just don't trust the GUI to get all the details right
when I'm working with partitions and/or entire filesystems.
(My one exception is gparted which is great for managing
partitions.) And rsync is the only tool I'll use to copy a lot
of files...especially for large filesystems.
rsync is fast, it can work over a network with ssh encryption,
it can preserve hard links, and it can pick up where it left off
if it is interrupted.
If you must use Windows, consider robocopy which is
designed to work similar to rsync. However I would use
ssh to connect to the Windows computer from a Linux
host if possible and use rsync before using robocopy.
YMMV
c
On 3/25/20 7:06 PM, email5000 at usa.com wrote:
> Thanks Carl, that shed some light on it for me.
>
> In the context of the basic question, I was trying to determine why I
> couldn't get anything to copy using the GUI, unless it was a 'refresh'
> issue. I started this 'project' thinking it would be quicker to attach
> the naked drive inside my Win 10 box using File Explorer windows. All
> the drives are SATA III capable, tho' all the hardware is level II.
> Either way, it appeared that, tho' it may take a bit longer to copy
> everything over (II vs III = 2x longer), it should complete within a
> 'reasonable' amount of time. The problem I was encountering when I did
> the drag-n-drop was that Win 10 appeared to take an inordinate (read it
> as 'painful') amount of time just calculating SOMETHING before any
> transfers ever occurred; and it appeared to eventually work. For small
> folders, it seemed reasonable, but for any folder that had any
> significant (>= ~1 MB) it was just taking forever. And I have some
> rather large folders to copy.
>
> I thought that maybe the Pi would be faster, and not spend so much time
> playing with itself; but I had the problem with the file manager (fm)
> windows, hence my question. So, up to speed.....
>
> When I re-booted the Pi after reading the response, I used the mount
> command to mount the NAS, then simply plugged in the corresponding USB
> case with the target drive (to copy all the data to). Now when I looked
> at the fm window I could get folders on the NAS to copy to the target
> USB drive.
>
> However, what is confusing is that some folders appear in the fm window,
> and other folders DO NOT appear in the command line. I'm stumped. I can
> see the folders in the fm window that I [thought] I copied, but they
> just don't show at the command line. Up to this point, I did try the
> command that was recommended (rsync) on a given folder, and that
> appeared to complete quickly; but it didn't show up in the fm window
> (refresh issue?). Since I can not see all the folders copied in EITHER
> the fm window OR the command line, I'm tempted to just wipe the target
> drive and apply Carl's suggestion, 'cuz that seems to work well. Wiping
> it at this point is not too much of a loss because I haven't [attempted
> to] copy all that much [yet].
>
> Any clues, here?
> -Rich
>
> On 3/23/2020 21:24, Carl T. Miller wrote:
>> All you're missing is the command line.
>>
>> First, run "df -h" to ensure that the drives are mounted
>> properly and appear to have the right amount of free
>> space.
>>
>> Next, run "ls -ld" for each of the mountpoints. Verify
>> that the permissions are right.
>>
>> Then use rsync to copy the files. Something like:
>> rsync -aHvx --progress /mnt/nas/ /mnt/hdd
>>
>> That should do the trick. Let us know how it goes.
>>
>> c
>>
>>
>> On 3/23/20 3:05 PM, email5000 at usa.com wrote:
>>> I think I'm missing something...
>>>
>>> I have two mounted drives on my Pi - my NAS and another HDD in a USB
>>> case that I'm using to backup the data. I've copied data to/from the
>>> NAS
>>> before; and regarding TO the NAS to the Pi, I needed to change the
>>> permissions on the mount point to allow the writing. I've done all
>>> that.
>>>
>>> I presently have two 'file explorer' type windows - obviously one for
>>> the NAS and one for the external HDD. Obviously both are mounted. As
>>> far as I can tell, all permissions are copacetic. When I attempt to
>>> 'drag-and-drop' the folder on the NAS to the folder on the USB HDD,
>>> the
>>> file image being dragges scoots back to the other side.
>>>
>>> What am i missing?
>>>
>>> Thanks.
>>>
>>> _______________________________________________
>>> mdlug mailing list
>>> mdlug at mdlug.org
>>> http://mdlug.org/mailman/listinfo/mdlug
>>
>> _______________________________________________
>> mdlug mailing list
>> mdlug at mdlug.org
>> http://mdlug.org/mailman/listinfo/mdlug
> _______________________________________________
> mdlug mailing list
> mdlug at mdlug.org
> http://mdlug.org/mailman/listinfo/mdlug
>
More information about the mdlug
mailing list