angelo-v / wordpress-backup

Simple Docker container that helps you backup and restore your WordPress blog.
80 stars 60 forks source link

Switch to incremental backups #7

Closed j3k0 closed 7 years ago

j3k0 commented 9 years ago

Implemented using tar --listed-incremental (http://www.unixmen.com/performing-incremental-backups-using-tar/)

Important changes imposed by this feature:

1 - Backups are now timestamped at the second.

Why? Because it shouldn't be possible to override an existing backup file with a new one (loosing 1 backup in the history and you loose data).

So if someone makes multiple backups per day (by cron or by running backup manually), he won't override any backup.

2 - Migration requires the whole set of tar files.

Because restoring is now done by untaring the whole history of backups one by one, the user needs to migrate the whole backup folder.

angelo-v commented 8 years ago

Hi,

thanks for implementing this feature. I have some concerns merging this at the moment:

1 - Not overriding backups is good (or even essential for the incremental version). But the simple per day timestamp was chosen, so that one can easily restore a backup from a given day, just by providing the timestamp of that day. To restore now, I must know the exact timestamp of the backup. Worse, this new restriction and way of usage is not mentioned in the Readme file.

2 - This saves some storage, but makes things harder to handle. It might also confuse people that files are backed up incrementally, whereas the database is not.

I see that incremental backup might be better for some use cases. I might merge it into a separate feature branch and allow people to chose whatever suits them best. But this requires an update of the usage documentation in the README file.