These instructions aren’t in the documentation nor the project’s source repository so I’m jotting them down here for others. How to backup Gitea and your Gitea database using Docker adapted from the High Tea
Backups use the standard Gitea Backup procedure adjusted for use with Docker as follows:
Shell into the Docker container:
docker exec -it $(docker ps -qf "name=gitea") bash
gitea dumpthe create the backup archive within the container:
/app/gitea/gitea dump -c /data/gitea/conf/app.ini
/datais a volume mapped from the container to your host’s
Exit the shell and use
docker cpto copy the archive to the host:
docker cp $(docker ps -qf "name=gitea"):/gitea-dump-1537778440.zip .
If your host machine does not, itself, have a backup process in place consider moving the backup archive to a cloud storage service such as Mega or Amazon S3 for safekeeping.