toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

WIP: backup and restore scripts

Open JuneKelly opened this issue 4 years ago • 7 comments

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

JuneKelly avatar Aug 31 '21 12:08 JuneKelly

cc @mserranom @gh2k

JuneKelly avatar Aug 31 '21 12:08 JuneKelly

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.

mserranom avatar Sep 03 '21 08:09 mserranom

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.

gh2k avatar Sep 03 '21 10:09 gh2k

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

mserranom avatar Sep 03 '21 14:09 mserranom

How do we feel about resurrecting this work? @gh2k

JuneKelly avatar May 12 '22 10:05 JuneKelly

I guess this falls under @cmcisaac6's remit... I like the idea of having a canonical way to perform a backup though.

gh2k avatar May 31 '22 10:05 gh2k

Could we create a ticket to cover this so that it's tracked on the main board, please?

gh2k avatar May 31 '22 11:05 gh2k