Closed tdudgeon closed 5 years ago
A Postgres Backup and Recovery recipe can now be found in the recipes
directory.
FWIW, in the jupyter-on-openshift/jupyterhub-quickstart
repo, I have a script that can run as a managed service in JupyterHub container, that will periodically look for changes to user details and write out a snapshot to the file system, as well as optionally write it back to a config map.
In the jupyterhub_config.py
file you would then have:
c.JupyterHub.services = [
{
'name': 'backup-users',
'admin': True,
'command': ['backup-user-details',
'--backups=/opt/app-root/notebooks/backups',
'--config-map=%s-cfg-backup' % jupyterhub_service_name]
}
]
This provides a simple way of being able to save user details so that if the database is corrupted, you just need to start over with a empty database and then reload the users again.
Can be used as light weight alternative to having full PostgreSQL backups.
Closing as this has been implemented.
We need to handle backups for the prostgres database in the openrisknet-infra project