Rsync to backup storage drive

  • I know this is not the best plan for backing up a storage drive...


    I have two 3T drives in the system. One will act as a backup of the other. I realize it would be better to have the backup as an external drive or remote server.
    I have several shares defined on the source drive.
    I have one share on the target (backup) drive called omv-backup.


    I'd like to use rsync to do an automatic backup of some of the shares from the source drive and drop them into the 'omv-backup' share on the target drive.
    But I want them to go into uniquely named subdirectories of the backup drive - ideally the subdirectory name would be the sharename from the source.


    I don't see a way to do this by setting up rsync jobs in the web gui.


    If I had separate shares on the target drive pre-defined for each share on the source drive, then that would probably work.
    But I am trying to get all the backups to live under that one share 'omv-backup'


    Am I missing something in the configuration of the rsync jobs that might allow me to do this?

  • Zitat von "snuckleton"

    I know this is not the best plan for backing up a storage drive...


    I have two 3T drives in the system. One will act as a backup of the other. I realize it would be better to have the backup as an external drive or remote server.
    I have several shares defined on the source drive.
    I have one share on the target (backup) drive called omv-backup.


    No Problem with that. Better than no backup. ;)


    Zitat von "snuckleton"

    I'd like to use rsync to do an automatic backup of some of the shares from the source drive and drop them into the 'omv-backup' share on the target drive.
    But I want them to go into uniquely named subdirectories of the backup drive - ideally the subdirectory name would be the sharename from the source.


    If you copy a folder called 'peterparker' from a to b, it still is named 'peterparker' on the target location, so whats the problem?


    Zitat von "snuckleton"

    I don't see a way to do this by setting up rsync jobs in the web gui.


    I'm not used to setting up rsync Jobs via the GUI. For excluding folders from the rsync job, see: http://forums.openmediavault.o…wtopic.php?p=32201#p32201


    Zitat von "snuckleton"

    If I had separate shares on the target drive pre-defined for each share on the source drive, then that would probably work.


    Why? Folder names stay the same. See above for excluding folders from the rsync job.


    Zitat von "snuckleton"

    But I am trying to get all the backups to live under that one share 'omv-backup'


    Am I missing something in the configuration of the rsync jobs that might allow me to do this?


    At the moment I don't see what should restrain you from dooing that. Maybe you can specify a bit more where the problem is.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • David,
    My objective is to use the GUI to set up these rsync jobs. I have no doubt that one could get the desired results by setting up an rsync shell script and scheduling it to run. But I want to use the OMV Gui to set this up, if possible.


    The issue is the GUI seems to constrain the jobs as follows. Assume I have shares defined on the source drive called A, B, C. I have a share on the target drive called OMVBACKUP. I want to populate that target drive with OMVBACKUP/A/*, OMVBACKUP/B/* and OMVBACKUP/C/* From the GUI I can pick a share for the source (A, B, C) and a share for the target (OMVBACKUP), but the gui will set up the rsync job so that I don't get then name of the share as a subdirectory under OMVBACKUP. Instead the contents of A, B and C are dumped directly under OMVBACKUP.


    There is an inelegant way around this that still makes use of the GUI.
    Create on the target drive a share called OMVBACKUP_A, OMVBACKUP_B, OMVBACKUP_C. Then create the three rsync jobs.


    I'm just trying to avoid creating an explicit OMVBACKUP_X share for each source share.

  • I have to check this myself. This could take a couple of days due to lack of time.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • So, finally I found some time to test this. And it seems it should be really easy for you:


    My Setup:
    4 shares, A, B, C, D on one disk, OMVBACKUP on another


    rsync job (see attachment) copies A, B and C to OMVBACKUP


    Greetings
    David

  • David,
    Thanks for the reply. In the job you defined in the gui, do you end up with this on the OMVBACKUP share?
    OMVBACKUP/test/stuff in test
    Or do you get
    OMVBACKUP/stuff in test

  • The shared folder "test" is the whole drive ( / ). So you end up with anything that is on the drive, except D.




    Code
    root@openmediavault:/media/a6dda990-5422-4ae7-bf97-b27bc79cff83/OMVBACKUP# ls -la
    total 0
    drwxr-sr-x 5 root users 30 Mar 21 13:22 .
    drwxr-xr-x 3 root root  22 Mar 21 13:22 ..
    drwxrwsrwx 2 root users 30 Mar 21 13:24 A
    drwxrwsr-x 2 root users 30 Mar 21 13:24 B
    drwxrwsrwx 2 root users 30 Mar 21 13:24 C
    root@openmediavault:/media/a6dda990-5422-4ae7-bf97-b27bc79cff83/OMVBACKUP#


    Code
    root@openmediavault:/media/d2b12025-67fc-4ca7-9d38-a454fd147ddf# ls -la
    total 4
    drwxr-sr-x 6 root users   38 Mar 21 13:22 .
    drwxr-xr-x 5 root root  4096 Mar 21 13:21 ..
    drwxrwsrwx 2 root users   30 Mar 21 13:24 A
    drwxrwsr-x 2 root users   30 Mar 21 13:24 B
    drwxrwsrwx 2 root users   30 Mar 21 13:24 C
    drwxrwsrwx 2 root users   31 Mar 21 13:24 D
    root@openmediavault:/media/d2b12025-67fc-4ca7-9d38-a454fd147ddf#


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • You're welcome.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!