rsync from local linux mint to RPI with intallaed OMV5 copies files into /run/user/1000

  • I have set up my omv samba share partition on fstab with the following command:

    Code
    //192.168.178.145/Rsync_Dell /mnt/Rsync_Dell cifs credentials=/home/Alessio/.smbcredentials,uid=1001,gid=100 0 0

    where .smbcredentials stores username,password and domain name.

    I saved the rsync job using the command

    Code
    sudo crontab -e -u root

    the job in crontab is :

    Code
    0 1-23 * * 0 sudo rsync -az --delete-delay /home/Alessio/ /mnt/Rsync_Dell/ --exclude=".*"


    The command will not work. More specifically the pc does not mount correctly the samba share server and when it does run the job it just backs up to the local filesystem under


    Code
    /run/user/1000/gvfs/smb-share:domain=WORKGROUP...

    and not on the Windows share. I have tested the mount and it correctly mounts but fstab seems to not understand the correct path.

    • Offizieller Beitrag

    I could, could you walk me through it? I am running a linux mint laptop, is there any guide?

    OK.. I'm assuming you're backing up a folder on Mint, to the server?... I've only backed up between two servers... gimme a sec.

    • Offizieller Beitrag

    I confirm that I need to back up my home folder on mint to the server that is running OMV. Thank you!

    OK, sorry got tied up for a second and it was a little harder than what i thought... but really not difficult once you get the hang of it (I haven't quite figured out how to automate this, but this will at least allow you to do manual backups.. you'll just have to do some further reading)


    First, on the OMV side.

    Create a shared folder where you want your home backed up (make sure you remember the name of this folder)

    Go to rsync in the webUI

    Click the Server tab

    Click Settings and enable the rsync server.

    Click Modules

    Add Module

    Choose the shared folder you just created, and name the job

    I used an OMV user/users group... if you don't have a user on OMV, create one.. that's all I can suggest as I'm not sure this will work w/o a user.

    Scroll down to where it says host allowed, and put in your mint local IP address

    Save and apply changes to the module.


    On Mint

    You might want to start with a smaller folder than your entire home folder to make sure this works how you want..... but it will work either way.


    sudo apt install grsync

    Open grsync from the Mint menu

    Click Advanced

    The top path, that is the path on our laptop you want to backup (/home/something/ I'm assuming)

    The bottom path, is the path to your rsync folder on OMV.. so it will look like this

    rsync://username@serverip:/shared_folder_name (the one you created on OMV)

    Click the blue button at the top... This is a "dry run".. it's not going to sync anything but will show you what it would have done (or if there's an error, it will show it)


    Assuming all goes OK, and you want to sync, click the gears beside the blue i button, and that will actually run the job.


    Once you're all done and you've got it running how you want, click the Green + button, and name the profile for the job, so it will be available next time you start grsync

  • Thanks for this guide. I am now busy setting it up as well.
    I do have extra questions:

    - can I use a sharefolder that actually uses a user with password (not public)?

    - in Hosts allow you mentioned to put the client ip address. if that is not static, can I leave the blank? The description mention to leave it blank for default settings. I search the OMV doc and I cant find a description of what are the default settings. or can I use /24 to set a subnet?

    - when setting the shared folder path in client, I assume is the absolute path, correct?


    Thanks

    • Offizieller Beitrag

    Honestly, that's been quite a while ago and I don't really remember. I didn't really mess with it, beyond what I did above.


    But a few things I recollect..


    1. The shared folder is mounted on the client machine... and that is what you point grsync... Not sure if that answers your question, but if you're required to use a password to mount it, then I don't think there is any reason for grsync to also require a password.


    2. Blank I highly doubt. You could probably set it to 192.168.1.0/24 (assuming your router is 192.168.1.1).. That would probably allow any client on the network to write to it.


    3. Rsync shares the path, so it would be exactly what I put.. You would not need the absolute path here.

  • ok. thanks

    • Offizieller Beitrag

    ok. thanks

    What client are you using? I'm assuming Mint/Ubuntu or Windows? I think Syncthing will be a far easier way to achieve this... if you're not opposed to docker (and you shouldn't be, as it's awesome)

  • Also for what it's worth.. it might be easier to set up a syncthing server in docker, install a syncthing client on your OS, and then set it up that way. It would almost certainly be easier to automate.

    that is actually my next step if rsync is getting too messy to set it up.

    the only thing is that I like rsync for the way it handles the backup and the daily/weekly/monthly backup and the simple way to restore a single file (if I not confusing with timeshift).

    I will give a shot with rsync and see...

    Thanks anyway.

    • Offizieller Beitrag

    that is actually my next step if rsync is getting too messy to set it up.

    the only thing is that I like rsync for the way it handles the backup and the daily/weekly/monthly backup and the simple way to restore a single file (if I not confusing with timeshift).

    I will give a shot with rsync and see...

    Thanks anyway.

    I think you can set the syncthing client up that way... now you're making me curious.

    • Offizieller Beitrag

    I believe syncthing has versioning system. But I dont think is incremental... not sure but I guess you end up with several copy of backup when using versioning...

    You kind of got me curious, so I just set it up my laptop and server (I tested it a long time ago, but when I rebuild my servers next month I might actually go with syncthing for remote backups). It's actually quite easy. Just going through the options, it does have versioning. It looks like you can set up versioning in the client, but I've not messed with it yet (I've got it set to none at the moment)...


    It's really not difficult to set up, the one thing that got me.. since the client is also configured via a webUI... and it looks very similar to the Server side webUI, I caught myself doing things on the client side when I thought I was on the server side (and vice versa). Just resulted in unnecessary confusion


    My suggestion.. the server and client each have a couple themes for their web interface... Set your server to a "Dark" or "Light" theme, then set the client to the opposite.

  • You kind of got me curious, so I just set it up my laptop and server (I tested it a long time ago, but when I rebuild my servers next month I might actually go with syncthing for remote backups). It's actually quite easy. Just going through the options, it does have versioning. It looks like you can set up versioning in the client, but I've not messed with it yet (I've got it set to none at the moment)...


    It's really not difficult to set up, the one thing that got me.. since the client is also configured via a webUI... and it looks very similar to the Server side webUI, I caught myself doing things on the client side when I thought I was on the server side (and vice versa). Just resulted in unnecessary confusion


    My suggestion.. the server and client each have a couple themes for their web interface... Set your server to a "Dark" or "Light" theme, then set the client to the opposite.

    Hi KM0201,

    I use syncthing a lot. I know how to configure it.

    What I dont think it does is incremental backup; copying only the modified/changed/deleted files...
    If I am not wrong, versioning means will keep a number of version of the same backup for defined time. (correct me if I am wrong).

    That is of course, a solution.. provided we have enough space on disk.

    In all case, is a very valuable solution.

    You can also choose who sends, who receive or if should be both ways. Is a very dynamic solution, I agree.

    I still like to give a go to rsync.

    But I do see coming up issues: (with rsync)

    the remote folder has to be mounted at all time. Means that if the mount fails, no backup take place.

    Recently I had issues to permanently mount the share in fstab (cant figure out why just yet).


    Syncthing actually works almost in any scenario; with/out VPN or local LAN and is encrypted transfer at all time. With latest version you can even choose to have a password for the transferred files...

    More and more I write about it and I also think is probably a better solution...

    Its that I wanted to try the built in rsync server in OMV5...


    ...

    To be seen... ;)

    • Offizieller Beitrag

    I'm gonna have to look at grsync again to make sure, but the rsync share should not have to be mounted on the client. Like I said, I don't really use rsync for clients/server, and use it to back up two servers... and they definitely do not have remote mounts on them.

  • I'm gonna have to look at grsync again to make sure, but the rsync share should not have to be mounted on the client. Like I said, I don't really use rsync for clients/server, and use it to back up two servers... and they definitely do not have remote mounts on them.

    Well... al this time I tried out ... I got to the conclusion that grsync is not what I need.

    For first: after manually mounting the share, I configured grsync to save the files in /mnt/mounted_share

    I run a test and had no errors. so I started the backup... it was super fast... too fast!

    I check.. yes, my all /home folder was backed up in the /mnt/mounted_share BUT it was only local and I run out of SSD space!!!!!

    I though a mounted share would point to the network share... that did not happen!

    looks like I dont know anymore what linux does when mounting a share!!

    I have enough for today.. will try more in the future... this is not working as I want yet.

    :(

    • Offizieller Beitrag

    I'm not sure why you mounted the share locally, you shouldn't need to. Like I said, I last tested this months ago, but my instructions seem to confirm this...


    If you were targeting /mnt/whatever , then you were doing your own thing and not what I suggested.. The way you're trying to do this, you wouldn't even need to run an rsync server.. It *should* work just the same.. however since it didn't, I can only come to a couple reasons why:


    1. You entered the path wrong

    2. The share was not mounted.


    That's how it ended up on your OS disk, but again, it wasn't necessary to do that. If you done what I put above and it could not reach the server, you would just get an error it could not connect to the rsync server, and that's it.

  • I had a break about this. I will soon pick it up again. I though I did the right thing.. but something does not got the way it should. I will review it.
    Ps,

    how about your synchthing tests?
    Do you also agree that syncthing cant do incremental and differential backup?
    I am puzzled by the versioning in syncthing.. I need to read more about it if that can act as sort of differential ...

    https://docs.syncthing.net/users/versioning.html

    Its interesting... Staggered File Versioning might even do the trick.

    But I think that will make a full copy and all the daily updates are not incremental... not sure...
    Its getting interesting.

Jetzt mitmachen!

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