NAS326 copy external drive to another external drive

sdubose99
sdubose99 Posts: 3  Freshman Member
First Comment
edited November 25 in Personal Cloud Storage

I have two external drives connected to my NAS via USB. Is there a way to clone one external drive to the other external drive, without having a computer connected via wifi?

All Replies

  • ashleyhall
    ashleyhall Posts: 2  Freshman Member
    First Comment

    Yes, you can clone one external drive to another directly using your NAS326 without needing a computer connected via Wi-Fi.

  • Mijzelf
    Mijzelf Posts: 2,774  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary

    That can certainly be done, using the command line. You can enable the ssh server (somewhere in network settings) and login over ssh.

    Then you have to find the mountpoints of the disks. These are in /e-data, so the command

    ls /e-data/
    

    will give you the mountpoints. Then enter the empty disk:

    cd /e-data/<some-hex-code>/
    

    and copy the contents of the other disk:

    cp -a /e-data/<hex-code-of-the-other-disk>/* .
    

    You can find which disk is which by looking at the content:

    ls /e-data/<some-hex-code>/
    

    Then there is one nasty detail, the copy session is connected to the terminal it's running in. So when you close the terminal, the copying stops. To prevent that, you'll have to decouple it:

    cp -a /e-data/<hex-code-of-the-other-disk>/* . 2>&1 >output.txt
    

    This will redirect stderr to stdout, and stdout to the file output.txt. When everything works, you can see the contents of the disk being copied via the webinterface or samba, and the file output.txt growing with command output.

  • sdubose99
    sdubose99 Posts: 3  Freshman Member
    First Comment

    Mijzelf thank you!

Consumer Product Help Center