-
-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I see a number of ways we might go about baking backup and restore into the images. As this is pretty much the last big feature I'd like to add, I'm curious to hear opinions on which way to go.
Current situation:
User is on :release which is exist-db 4.x, once 5.x (a binary incompatible) major upgrade is out, just running:
docker pull existdb/existdb:release will create a broken instance.
Ideally, I would like it to trigger a backup and restore
we could:
- tweak
conf.xml's backup job
<job type="system" name="check1"
class="org.exist.storage.ConsistencyCheckTask"
cron-trigger="0 0 * * * ?">
<parameter name="output" value="export"/>
<parameter name="backup" value="yes"/>
<parameter name="incremental" value="no"/>
<parameter name="incremental-check" value="no"/>
<parameter name="max" value="2"/>
</job>to kick the db into recovery mode, assuming we also made sure that automatic backups were created in the first place, e.g. by using ONBUILD
- include a call to an external script in
docker-compose.ymlso backup restore becomes the default when performing
docker-compose pullthis would go along with setting a restart_policy, rollback_config, and update_config and updating the docker-compose file version to 3.7.
- (least favourite option) passing responsibility on to the user, with some instructions in the
readme, something along the lines of:
docker exec exist java -jar start.jar -u admin -p admin-pass -b /db -d /exist-backup -ouri=xmldb:exist://192.168.1.2:80/xmlrpc'
(that last parameter will need some tweaking to work within the container network)
In either scenario, backups should happen to their own volume, so that one is a given in my mind.