blacklabelops / volumerize

Docker Volume Backups Multiple Backends
https://hub.docker.com/r/blacklabelops/volumerize/
MIT License
558 stars 77 forks source link

Containers are not restarted on failure #43

Closed bswinnerton closed 6 years ago

bswinnerton commented 6 years ago

I've noticed that when a backup fails (in my case it's due to the underlying mount point being unavailable), the docker containers that are automatically stopped are not restarted:

Local and Remote metadata are synchronized, no sync needed.
Last full backup left a partial set, restarting.
Last full backup date: Thu Sep  6 16:51:36 2018
RESTART: The first volume failed to upload before termination.
         Restart is impossible...starting backup from beginning.
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
No signatures found, switching to full backup.
Giving up after 1 attempts. IOError: [Errno 2] No such file or directory: '/backup/duplicity-full.20180906T165246Z.vol1.difftar.gz'

Would it be possible to ensure that docker containers are started back up even when there is an error backing up?

blacklabelops commented 6 years ago

Yes, that is a good idea.

blacklabelops commented 6 years ago

Implemented and available.

ghost commented 6 years ago

Are you sure that it works? I'm using version 1.2.1 and last night the backup failed to push the data via FTPS (I'm not sure why) and the containers stayed down after the failed backup.

blacklabelops commented 6 years ago

I will check.

blacklabelops commented 6 years ago

The solution has been refactored and tested after issue #56.

Old script already fails when one of the containers fails to either stop or start or being not available anymore.

New script ignores docker failures and starts available containers.

ghost commented 6 years ago

The solution has been refactored and tested after issue #56.

Old script already fails when one of the containers fails to either stop or start or being not available anymore.

New script ignores docker failures and starts available containers.

Thanks a lot for your work! I will update and check.

blacklabelops commented 6 years ago

Sorry, found the culprit when implementing #57.

You will have to upgrade to version 1.4.2 at least.