zeenlym / docker-mariadb-backup

Docker image for backing up mariadb
GNU General Public License v3.0
6 stars 5 forks source link

Fix restore bug, and sort restoreable backups by mtime #1

Closed joelbernstein closed 7 years ago

joelbernstein commented 7 years ago

Hi @zeenlym

I have found and fixed a bug in the restore functionality. The way you were constructing the 2>/dev/null shell redirection was not working, as it must be 2>wherever and not (as you had) 2 > wherever. Your command resulted in passing a '2' argument to 7zr which caused it to try to extract a file called '2' which does not exist in the archive.

I have also added some (not very well tested) code to sort the list of backups available to restore by file modification time, this makes it easier to select the correct one.

Can you merge this into master and rebuild the docker image on docker hub please?

joelbernstein commented 7 years ago

Actually, the sorting doesn't work (got a dict where i didn't expect one) so I'll back that out and revisit later.

The 2>/dev/null bugfix works.

joelbernstein commented 7 years ago

This fixes #2 - please apply / discuss.

joelbernstein commented 7 years ago

Nonetheless, this does make me wonder whether you have actually tested the restore system at all?

zeenlym commented 7 years ago

thanks for correction