Skip to content

how to go about backup and restore #40

@duncdrum

Description

@duncdrum

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.yml so backup restore becomes the default when performing
docker-compose pull

this 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions