rsync Incremental Backup

Recommended Posts

1 hour ago, Archonw said:

which attributes do i need for rsync?


I would:


1. Stop the container.


2. Backup the old files:


mv /mnt/user/appdata/mariadb /mnt/user/appdata/mariadb-old


3. Restore the backup:


cp -aT /mnt/user/unraidbackup/appdata/20220717_043012/mariadb /mnt/user/appdata/mariadb


4. Start the container 



So it's simply copying the files, except that "-a" copies the required file owner and permissions, too.

  • Thanks 1
Link to comment
  • 2 weeks later...

Would it work out to use $MOUNTPOINT as destination?



  # source                          # destination
  "/mnt/user"                 "$MOUNTPOINT/Backups"


Any reason why its not used by default? Thanks

Link to comment
8 hours ago, mgutt said:

What should this variable contain?




MOUNTPOINT : where the partition is mounted


In my case for my backup usb disk it would be /mnt/disks/WCJ65BZT and I wont have to bother with mountpoints for backup at all.



Link to comment
On 8/2/2022 at 9:00 PM, Thomas K said:


  # source                          # destination
  "/mnt/user"                 "$MOUNTPOINT/Backups"



Did some try runs. It works fine and you don't have to worry "where" the disk is mounted in the script.

Edited by Thomas K
Link to comment

hello friends,

first of all a big thank you to mgutt for the script.

Since I am still very inexperienced, I hope I do not ask too stupid questions.

The following, have the script completely copied out and adapted the following:

# backup source to destination
  # source # destination
  #"/mnt/user/Music" # "/mnt/user/Backups/Shares/Music"
  #"user@server:/home/Maria/Photos" #"/mnt/user/Backups/server/Maria/Photos"
  #"/mnt/user/Documents" #"user@server:/home/Backups/Documents"
   "/mnt/user/appdata/Debian #mnt/disks/Volume/backup_vm


Four entries commented out, and added these for testing:


"/mnt/user/appdata/Debian" "/mnt/disks/Volume/backup_vm"


So now unraid saves since yesterday evening about 22.00 o'clock continuously until now and further on my external USB HDD which I formatted as NTFS. It has copied about 1.20 TB so far! There is something wrong or? That's already over 12 hours!

Do not want to cancel the process now, if everything should be correct.

Who can help me further?

I would like to backup my Debian VM completely. That is my goal.

Sorry for my bad english. 
If you want to answer in german you are welcome to do so.



Screenshot 2022-08-05 115329.jpg

Edited by geromme
Link to comment

When you use ntfs some features will not work. Like hardlinks and permissions. 

I think it is better to use a linux-based file system.


And you can always cancel these jobs, because rsync can handle this. It resumes and did not start all over. 


Rsync solltest du unbedingt, auf ein Linux Filesystem schreiben lassen. Ansonsten funktionieren einige Sachen nicht wie geplant. Hardlinks oder das speichern der Userrechte. Ohne diese ist das Backup nachher kaum zu gebrauchen. 

Nimm daher z.B ext4 oder btrfs oder ähnliches.


Rsync kann man bedenkenlos abrechen. Es setzt dort wieder an, wo es aufgehört hat. Das ist einer der vielen Vorzüge von Rsync.

Edited by Archonw
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.