-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to go about backup and restore #40
Comments
@duncdrum I think this should be the users responsibility. |
I agree, however should attempt to document, how to carry out tasks that are specific to eXist running in a container environment and doing a backup is most likely one of those tasks.
why not just backup to the '/tmp' dir then 'docker cp' the backup files into your host Another alternate method comes to mind
I think, the distroless uses JRE, |
it's a good idea, but copying to local drive goes against all my docker instincts (shrug), |
However, as I mentioned, ant depends on tools.jar and it complains if it can't be found
So either we add, tools.jar from the JDK, in this repo |
closed by mistake |
@adamretter since we only require JRE for exist-db if the ant.jar needs a jdk thingy I'd say we should indeed ship with tools.jar |
Shipping tools.jar only is probably not allowed, license wise. Additionally there might additional technical consequences. So I'd recommend to install the whole JDK. |
We should not ship tools.jar like that. I think we need to take a step back and think about the fundamentals here! We are being blinkered by Docker. Docker needs to work for us, not us working for Docker ;-) The purpose of a backup is so that a user can get a full copy of their data and then move it to some backup media, in the past this was probably tape or CD-ROM but these days is likely a network share on a different machine. Two sensible options that I see:
|
re the re backup to |
I was talking about |
ok that makes more sense, so here is my latest take on our discussion. Instead of depending on a specific path existing in the bases gcr image like The readme gets a line for how to trigger a server side backup for a given container along the lines off: docker exec exist java -jar start.jar client --no-gui --xpath "system:export('/export/backups',0,0)"
docker cp exist:exist-data/export/backups . followed by: docker cp . exist:exist-data/export/backups
docker exec exist java -jar start.jar client --no-gui --xpath "system:restore('/export/backups', '', '')" I ll see about the |
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-db4.x
, once5.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:
conf.xml
's backup jobto 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
docker-compose.yml
so backup restore becomes the default when performingthis would go along with setting a
restart_policy
,rollback_config
, andupdate_config
and updating the docker-compose file version to3.7
.readme
, something along the lines of:(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.
The text was updated successfully, but these errors were encountered: