copy files

  • I recently setup OMV5. I want to copy files from my 2 old HDDS(sdc + sdd) to 1 new(sdb). All drives are mounted.


    drives1.png

    drives2.png


    How do I copy all the content from sdc1+2 and sdd1+2 to sdb1? So I can format the old drives in ext4 for further use.

    OMV 5 on MSI B-450 Pro Max|AMD Ryzen 3

    KODI on ODROID N2+

    Edited once, last by Jbloc ().

  • geaves

    Approved the thread.
  • OMV is not a file manager app. It won't do what you want:

    A gui explorer-like to move around files.


    You can do that via command line with midnight commander but be ABSOLUTELY SURE of what you're doing or you will kill your system:

    MC commander linux - Bing


    How to install and use Midnight Commander | Opensource.com

  • How do I copy all the content from sdc1+2 and sdd1+2 to sdb1?

    Soma's solution is good for any kind of data you have on disk.

    Another solution, if what you have on the old drives are shared folders, you can create new folders on the new drive and use rsync in the OMV GUI to make the copy.

  • They will be under /srv/dev-disk-by-something.


    You can check what is the mount point on OMV Filesystems

  • Been through this recently be warned, the copy will take hours!


    This is how I did it:

    For each shared folder

    1. create a target shared folder on the new drive
    2. create a rsync job from shared folder on old diskt to shared folder on new disk, do not enable it, so time does not matter, but add extra option --delete
    3. run rsync job
    4. disable /remove access to shared folder (samba, nfs, docker container ...)
    5. run rsync job gain
    6. enable / recreate shares with shared folder on new disk

    continue with next shared folder.


    Do not forget docker containers. If you have moved the docker root to one on the old disks, this has to be handled seperatly. The easyest is to revreate the containers with the new pathes.


    Prefere rsync over cp, because it keeps permissions and can rerun as often als you like. And do not use mv (move)

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Prefere rsync over cp, because it keeps permissions

    If you runcp -a, permissions will be kept also.

    I use it for "cloning" my container config folders.


    Got so used to it that don't use the rsync.

  • Got so used to rsync that I forgot about the -a flag


    One develops habbits.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Hi Jbloc, I had the same question when I started using OMV.


    To expand a bit on @Soma’s response, each filesystem is assigned a universally unique identifier (UUID). When mounted, the device information and UUID together form a path called the Mount Point. You can use that to identify and address that storage. An example would be something like this:

    /srv/dev-disk-by-uuid-f188c8ad-74d3-443a-a23e-89711270367d


    (Every disk will have a unique identifier.)


    You can find this in the OMV web interface under Storage> File Systems. The information is not immediately displayed this way by default. To show it, click on the down arrow at the top right edge of a column heading. Select Columns A list of available information will appear. Tick the the Mount Point box, and that column will be added to the table view. In that Mount Point column, you will now see the full path you can use, to specify which disk/filesystem to act upon:


    Note that the requirement to use the UUID is quite recent. So new that much of the documentation, guides and forum responses you may see for a while might still refer to Labels rather than UUIDs. It’s UUIDs now.


    Hope this will be helpful to you.


    (The bulk of this information is sourced from the Backup section of the OMV 5 New Users’ Guide, with thanks to the volunteers who prepared it.)

  • Just a note that rsync keeps permissions indeed, but in this particular case the data is copied from NTFS to EXT4, so no permissions will be transferred along anyway.

    Glad that good old MC did the job.

    OMV5 on RPi4B, WD elements 4TB

  • Been through this recently be warned, the copy will take hours!

    When I use MC to do a big copy job, I run it in a screen session via ssh, get the job started, disconnect the session, and go do something else. I can check on it anytime by reconnecting to the screen session.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 6.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 16GB ECC RAM.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!