toolkit
toolkit copied to clipboard
WIP: backup and restore scripts
Description
Work in progress. Do not merge.
This needs a lot more work to be usable in practice, but... the backup and restore process works, just like in our main monorepo.
Related issues / Pull Requests
Contributor Agreement
- [X] I confirm I have signed the Contributor License Agreement
cc @mserranom @gh2k
I think the bin/backup shouldn't stop the sharelatex container, just checking the container is not running when trying to create the backup.
The reason is that, according to docs, we need to gracefully close all editor sessions before attempting a backup. This should be done separately, maybe as part of bin/stop (and maintaining the current implementation of that script with a --force), or in a separate script.
I think the bin/backup shouldn't stop the sharelatex container, just checking the container is not running when trying to create the backup.
Given that users are likely to want to run this on a cron, is there a way to send a disconnectAllUsers, prevent reconnection and wait for them to all disconnect, and then make a backup? If the only mechanism to do this is manual, then it's tricky to get a backup done on a sensible schedule.
is there a way to send a disconnectAllUsers, prevent reconnection and wait for them to all disconnect, and then make a backup? If the only mechanism to do this is manual, then it's tricky to get a backup done on a sensible schedule.
There isn't unfortunately, see https://github.com/overleaf/internal/issues/4951
How do we feel about resurrecting this work? @gh2k
I guess this falls under @cmcisaac6's remit... I like the idea of having a canonical way to perform a backup though.
Could we create a ticket to cover this so that it's tracked on the main board, please?