How to perform backups?

Is there a set of best practices when backing up a baremetal JupyterHub 2.0 deployment? All I could find in the official documentation is this excerpt buried inside the Upgrading JupyterHub page:

Backup database & config

Before doing an upgrade, it is critical to back up:

  1. Your JupyterHub database (sqlite by default, or MySQL / Postgres if you used those). If you are using sqlite (the default), you should backup the jupyterhub.sqlite file.
  2. Your file.
  3. Your user’s home directories. This is unlikely to be affected directly by a JupyterHub upgrade, but we recommend a backup since user data is very critical.

Is this the “official” backup procedure? If so, is the recovering just a matter of creating a new environment and uploading the backed up files?

It depends on your JupyterHub deployment. For example, if you’re using a remote authenticator (e.g. GitHub OAuth) then all your state is in the JupyterHub database, and your user’s home directories, so it’s fairly easy to know what to back up.

On the other hand if you’re using a local authenticator which relies on local operating system users then to restore your system completely you’ll need a way to ensure those users are created in the OS. However this isn’t specific to JupyterHub.

If you’ve added any extensions to JupyterHub it’s possible they store additional files or state somewhere, though hopefully that would be made clear in the docs for the extension.