Commifreak / unraid-appdata.backup

UNRAID AppData backup plugin
21 stars 1 forks source link

Create linked backups for unchanged files #29

Closed ddarek2000 closed 2 months ago

ddarek2000 commented 3 months ago

Rsync lets me do backup that links unchanged files together reducing backup storage requirements. Especially useful for cache that is updated less often. This approach prevents me from compressing the backup files.

I think keeping the hash of uncompressed file and linking old file when hash is unchanged would accomplish similar in your plugin (cache_backup.log can contain that information).

For example , boot would only need to have a single backup. It should not change unless it is upgraded.

/usr/bin/rsync -avrtH \ --delete \ --delete-excluded \ --partial \ --exclude-from=${backup_path}/excludes.txt \ --link-dest $backup_path/current \ ${SHAREPATH%/} $backup_path/$time_stamp >> $backup_path/$time_stamp/cache_backup.log

echo "# Create symbolic link for current backup #" rm -f ${backup_path}/current ln -s ${backup_path}/${time_stamp} ${backup_path}/current

Commifreak commented 2 months ago

Maybe a task for a more detailed backup software. I dont see this feature for this plugin.