Confused about rsync behavior

  • So basically I'm using rsync to backup my dedi server to my NAS. I was using Synology's Active Backup for Business, however they don't support kernels newer than 5.10. They just released the update that added support up until 5.10 (used to be 5.4) so I can anticipate that it will take a lot longer to actually get to 5.15 which is what Ubuntu 22.04 uses. So that's why I'm using rsync to do it instead of ABB. This is the command I use
    rsync -avzx / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} <nas username>@<nas ip>:/volume1/NetBackup/telesphoreo-dedi
    Ideally this backs everything up except the folders that can't / aren't supposed to. So I have two questions. I'm currently using port 22 to do this, but I'm wondering how I can change the port to something other than 22. There's not a -p flag with rsync to specify the port so I'm not sure if I can or if I'm stuck using 22. Secondly, I'm confused on the behavior of this and if it's copying over the same files every time. Ideally, it would only copy over files that have had changes. I've heard this is the default behavior of rsync but to me it looks like it's copying everything over. That's not necessarily a problem right now because it goes pretty fast, but if it can be faster that'd be ideal. So I have no idea if it's doing it efficiently or not

  • Go to Best Answer
  • From the experimentation I've been doing to migrate data from one pool to another in my own NAS it looks like it will only copy files that aren't already there, what I'm not sure on is if it just checks for the name of the file and that's it or if it does anything else, but it didn't move files that it had already copied in my tearing anyway.

    Appreciate that's not all you needed to know but hopefully a useful start.

    Wild1145

    Network Owner at TotalFreedom

    Managing Director at ATLAS Media Group Ltd.

    Founder & Owner at MastodonApp.UK

  • wild1145 November 2, 2022 at 7:06 PM

    Selected a post as the best answer.