wordpress-backup
wordpress-backup copied to clipboard
Restoring order
I used the docker image to my wordpress stack. When I restore I see:
➜ wordtest docker exec wordtest_backup_1 restore 20181004
deleting files from /var/www/html/
restoring files from /backups/backup_20181004.tar.gz to /var/www/html
restoring data from mysql dump file /backups/backup_20181004.sql.bz2
mysql: [Warning] Using a password on the command line interface can be insecure.
Finished: SUCCESS
As far as I know, that's the wrong approach for backup/restore and the whole disaster recovery.
- First you need to restore, make sure there is no error.
- Then delete the current data.
- Then move the restored data to the working directory. Not a big change and still simple.
Of course there is also other approach, but that's too mach for simple backup/restore:
- Restore the files to new dir (with data suffix for example)
- Rename original directory with
.bak
suffix - Make the workdir a symlink to restored dir
I think you are right about that, though I have to confess it is not my top priority to implement it at the moment. But definitely something to be done.
@angelo-v sure, I got that :-) Anyway good job, backups are working on production for a long time now.