[GUIDE] Rsnapshot From One OMV Host to Another OMV Host Using Command Line

  • Rsnapshot From One OMV Host to Another OMV Host Using Command Line



    Description
    This little tutorial describes how to use rsnapshot on an OMV host (hereby referred to as "Backup Host") to directly do snapshot backups of data residing on another OMV host (hereby referred to as "Main Host").
    In other words, you will not need to rsnapshot onto "Main Host" first and then transfer the snapshots to "Backup Host" via rsync (or any other method).
    This can be useful for those who prefer to keep snapshots and the data on separate hosts due to various reasons (mine was the lack of HDD space and SATA ports in any of the hosts) and if the remoteshare plugin does not work (which is fixed in OMV 3).


    Requirements
    - Two OMV Hosts (preferably fully updated, same OMV versions)
    - Both connected in a LAN
    - Being willing and able to work with command line (e.g. PUTTY)


    Procedure

    • Keep in mind that rsnapshot is a pull-based design; the "Backup Host" running it will pull the data from the "Main Host" (see links 1 and 2). You can't push data from the "Main Host" in other words.
    • In "Main Host", use OMV GUI to create SMB share of the data you want snapshots of (You may also use other network sharing protocols like NFS but I have yet to try this)
    • (Optional) In "Backup Host", use OMV GUI to create SMB share to contain the snapshots (You may also use other network sharing protocols like NFS but I have yet to try this)
    • In both hosts, install the Rsnapshot plugin using the OMV GUI
    • In both hosts, enable SSH using the SSH plugin in the OMV GUI
    • Open two command line windows, one for the "Backup Host" and another for the "Main Host"
    • In both hosts, execute "sudo apt-get install cifs-utils" or equivalent for the network protocol used (see link 3)
    • In "Backup Host", make a mount point (e.g. sudo mkdir /media/samba) (see link 4)
    • In "Backup Host", open /etc/fstab with your text editor (e.g. sudo nano /etc/fstab/)
    • Add the share of the "Main Host" in the last line of fstab (e.g. //192.168.1.21/test /media/samba cifs defaults,credentials=/etc/samba/credentials 0 0) (see link 4)
    • In "Backup Host", create /etc/samba/credentials with your text editor (e.g. sudo nano /etc/samba/credentials)
    • Add the credentials of the share like this into /etc/samba/credentials and save: username=[your username]password=[your password]
    • In "Backup Host", make the file owned by root and ro by root (e.g. sudo chown root.root /etc/samba/credentials && sudo chmod 400 /etc/samba/credentials) (see link 4)
    • In "Backup Host", execute "mount -a" to mount the share of "Main Host" (or you may restart "Backup Host")
    • In "Backup Host", open /etc/rsnapshot.conf with your text editor (e.g. sudo nano /etc/rsnapshot.conf)
    • Edit snapshot_root to where in "Backup Host" you want to save the snapshots to
    • Edit the backup points to point to the share of "Main Host" (e.g. /media/samba/ test/)
    • Edit any other parts as you see fit
    • Save rsnapshot.conf
    • In "Backup Host", execute "rsnapshot configtest" and "rsnapshot -t hourly" to test
    • Finally, execute "rsnapshot hourly" to perform the actual snapshot! (Or you may even cron this as you see fit)


    References
    1. http://askubuntu.com/questions…he-server-from-the-client
    2. https://www.digitalocean.com/c…rsnapshot-on-ubuntu-12-04
    3. https://askubuntu.com/question…d-superblock-error/525246
    4. https://help.ubuntu.com/community/Fstab

    • Offizieller Beitrag

    If you used the remoteshare plugin on OMV 2.x or the remotemount plugin on OMV 3.x, you could do a push or pull rsnapshot all from the web interface.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    That only affects the remoteshare plugin on OMV 2.x and that is only when using a shared folder with data in it or using / as the shared folder path. The remotemount plugin has neither issue. You could also just edit the mntent entry in config.xml and then omv-mkconf fstab with the remoteshare plugin. Just trying to give tips that reduce the amount of command line.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Ah I see, is that remoteshare issue resolved in OMV 3.x?

    Also, I am unable to find the remotemount plugin at all (even with OMV extras installed)...

    Hmm, did the remoteshare plugin in OMV 2.x get renamed to remotemount plugin in OMV 3.x (and thus the issue is more or less resolved in OMV 3.x)?

    • Offizieller Beitrag

    did the remoteshare plugin in OMV 2.x get renamed to remotemount plugin in OMV 3.x (and thus the issue is more or less resolved in OMV 3.x)?

    No. It was completely rewritten and given its own name. There is no upgrade path. It doesn't have the issue because it creates it own mountpoint just like other filesystems. There would be no files in it. You can also easily edit the options that go into fstab.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • No. It was completely rewritten and given its own name. There is no upgrade path. It doesn't have the issue because it creates it own mountpoint just like other filesystems. There would be no files in it. You can also easily edit the options that go into fstab.


    Thanks! Let me upgrade to OMV 3 and see how this goes

    • Offizieller Beitrag

    The remotemount plugin solved all of these issues.

    Good to hear :)

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

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