I know how to use rsync, but I dont want to mirror an exact copy of a directory
Is it possible with rsync to just save the files/directories that were created or altered with dayly intervals saved in a folder by date.
So every day say at 24h00 all files created or changed are saved in a folder etc.
Rsync used as is, will replace good files with corrupt ones so it is not an option. Having dayly copies gives me way more options with up to 365 undo’s for mission crytical files.
As a cheap hack, you could run rsync with the --dry-run option to list all the changed files, then copy those files to a new directory. A better solution might be to use rsnapshot which acts like rsync with incremental backups. As a more complex and robust solution, consider using a filesystem like zfs and create daily snapshots of your filesystem instantly.
Thank you for the great suggestions.
zfs is not an option right now as it is too many servers.
rsnapshot and all these ready made solutions can do about everything except what is needed in reality.
Thanks for the --dry-run suggestion. That combined in a bash script will work. Dont know why I didnt think about that.
I’m glad you found the suggestion helpful. Admittedly, the --dry-run solution won’t be very efficient because it will copy entire files instead of just the changed bytes. You may also need to think about files whose timestamp changed but whose contents did not, since --dry-run may list them depending on your other rsync options. Good luck.