rsync-time-backup
rsync-time-backup copied to clipboard
How to restore all files before a specific date
Hi,
As it keeps the increamental backups, how can we restore the backups before a specific date/timestamp?
I can’t see any parameter for the timestamp here: rsync -aP /path/to/last/backup/ /path/to/restore/to/.
Many thanks for this efficient backup script.
Just replace /path/to/last/backup/ to the path of a backup that you already made.
I think that you need to browse into the path of your backups to see how it the directories named, you will see that inside the /path/to/last/backup/ will be several directories with timestamp as a name, inside each of those you will see a full snapshot of your wanted-to-be-backup'ed directory, will full contents, so you just need to run for example for a 2018-03-30-120001
timestamp directory:
rsync -aP /path/to/backups/2018-03-30-120001/ /path/to/restore/to/
the last /
after timestamp directory is needed, if you dont put it as on:
rsync -aP /path/to/backups/2018-03-30-120001 /path/to/restore/to/
then you it will create an uneeded directory with that name and will add it on the destination and end as:
/path/to/restore/to/2018-03-30-120001