+
Skip to content

macrat/gitea-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gitea backup container

WARNING: Currently (December 4, 2021), the gitea dump command seems not work well on the Docker. Please consider to use volume-backup instead of this.

A docker container image for scheduling backup of Gitea.

# Start your Gitea container
$ docker run -d -v gitea:/data -p 3000:3000 gitea/gitea

# And then, start backup scheduling container.
$ docker run -d -v gitea:/data -v $(pwd):/backup ghcr.io/macrat/gitea-backup

In default, it runs backup on 2:42 every day, and retain 3 files. You can customize this behavior via environment variables.

Please see also Backup and Restore section of the official documentation.

Note: You can not stop this container with Ctrl-C. Please use docker stop command.

Options

Environment Variable Default Description
BACKUP_SCHEDULE 42 2 * * * Schedule in crontab spec.
BACKUP_PREFIX gitea-backup- Prefix string of backup file.
BACKUP_RETAIN_NUM 3 Number of retain backup files.
BACKUP_USER git Username to execute backup.
# For example, retain backup files 7 days.
$ docker run -d -v gitea:/data -v $(pwd):/backup -e BACKUP_RETAIN_NUM=7 ghcr.io/macrat/gitea-backup

# Or, backup once a week, every sunday.
$ docker run -d -v gitea:/data -v $(pwd):/backup -e BACKUP_SCHEDULE='0 0 * * 0' ghcr.io/macrat/gitea-backup

About

A docker container image for scheduling backup of Gitea

Resources

License

Stars

Watchers

Forks

Packages

 
 
 
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载