Command to copy from one disk to another

Discussion in 'Server Operation' started by danhansen@denmark, Sep 7, 2014.

  1. danhansen@denmark

    danhansen@denmark Member HowtoForge Supporter


    OS: Ubuntu Server 12.04.5/RAID1 (software RAID)
    Set up as FileServer

    What's the best command/argument to use, when copying data from one drive to another?? I want to copy all the content of e.g. "md1" --> a backup disk "sdc" every 24hour/one time every day !?
    Last edited: Sep 8, 2014
  2. srijan

    srijan New Member HowtoForge Supporter

    You can use rsync

    where options can be
    -v : verbose
    -r : copies data recursively (but don’t preserve timestamps and permission while transferring data
    -a : archive mode, archive mode allows copying files recursively and it also preserves symbolic links, file permissions, user & group ownerships and timestamps
    -z : compress file data
    -h : human-readable, output numbers in a human-readable format

    Just select which type of backup you want and set a cron to run in 24 hours once.
  3. danhansen@denmark

    danhansen@denmark Member HowtoForge Supporter

    Rsync - sound great!!!

    Hi Srijan,

    Thanks for helping me, again :eek:

    Rsync sound great! I'll read about it right away! But I'll guess it's a program which syncronizes data on disks. Haven't heard about it, I think, so I'm going to read a little first and then get back.


    Sounds just right !!!!

    Really a nice thing to only transmit the diff. Especially when using it on the net. There's certainly posibilities here ;)

    1. I'm not sure what -v and -vv does. Tried to look up the words but it makes no sense to me :eek: But I certainly need " -a "
    2. Actually my plan was to just make a copy of the data so that the data was accessible, but now I'm not so sure anymore. Maybe it's better to compress/set pasword etc. !?!? In this case it's just data from one disk* to another, and I wanted the data on the backup disks to be readable straight away, if needed! But I'm not sure!? What would you do in my situation? Protect the backup'ed data? My priority is not to loose data. Not personal security, not speed. (* md/RAID - you know what I mean)
    Last edited: Sep 9, 2014
  4. srijan

    srijan New Member HowtoForge Supporter

Share This Page