Is dump from within Docker safe?

The Backup instructions start off with:

To ensure the consistency of the Gitea instance, it must be shutdown during backup.

But then the backup Using Docker instructions provide a command line for running gitea dump inside the running container.

How are those two not at odds? docker exec doesn’t stop the container, so the service is still running. gitea dump doesn’t seem to do anything special to pause the service, so how do we not run the risk of an inconsistent backup?

Is there a safe way to take a backup of a Docker Gitea?

2 Likes

These instructions are indeed inconsistent with the recommendation for consistency and should be updated.

Assuming the Gitea instance was installed as per the docker instructions, the safest way to perform a backup is to shutdown the container, dump the SQL database and save the file system directory. And the start the container again. See the backup section of the Hostea upgrade guide for more details.

The link to Hostea isn’t working for me. Do you have a working link?