summaryrefslogtreecommitdiffhomepage
path: root/public/v4/apps/offen-local-docker-backup.yml
diff options
context:
space:
mode:
authorIsmail D <[email protected]>2022-12-25 01:49:30 +0100
committerGitHub <[email protected]>2022-12-24 16:49:30 -0800
commit0737bedb994e7c6cc99390d77ebe4d8145b0214d (patch)
treec0e19cc256cba337b79e6fd76e44f41355e53c55 /public/v4/apps/offen-local-docker-backup.yml
parentf35d0af8e6b887bcb193ebd92a29fca0c7e82ae6 (diff)
downloadcaprover-one-click-apps-0737bedb994e7c6cc99390d77ebe4d8145b0214d.tar.gz
caprover-one-click-apps-0737bedb994e7c6cc99390d77ebe4d8145b0214d.zip
Feat/add local volumes backup (#821)
* Add Backup Docker Volumes Locally * Update naming
Diffstat (limited to 'public/v4/apps/offen-local-docker-backup.yml')
-rw-r--r--public/v4/apps/offen-local-docker-backup.yml51
1 files changed, 51 insertions, 0 deletions
diff --git a/public/v4/apps/offen-local-docker-backup.yml b/public/v4/apps/offen-local-docker-backup.yml
new file mode 100644
index 0000000..cf83dd5
--- /dev/null
+++ b/public/v4/apps/offen-local-docker-backup.yml
@@ -0,0 +1,51 @@
+captainVersion: 4
+services:
+ $$cap_appname:
+ image: offen/docker-volume-backup:$$cap_version
+ environment:
+ BACKUP_FILENAME: $$cap_backup_filename
+ BACKUP_ARCHIVE: /archive
+ BACKUP_CRON_EXPRESSION: $$cap_backup_cron_expression
+ BACKUP_RETENTION_DAYS: $$cap_backup_retention_days
+ volumes:
+ - $$cap_volume_to_backup:/backup/data
+ - $$cap_backup_path:/archive
+ restart: always
+ caproverExtra:
+ notExposeAsWebApp: 'true'
+caproverOneClickApp:
+ variables:
+ - id: $$cap_version
+ label: Docker volume backup version
+ defaultValue: 'v2'
+ description: Check out their Docker page for the valid tags https://hub.docker.com/r/offen/docker-volume-backup/tags
+ validRegex: /^([^\s^\/])+$/
+ - id: $$cap_volume_to_backup
+ label: Volume to backup
+ description: Path of the volume that you want to backup, e.g. `/var/lib/docker/volumes/captain--my-app/_data`
+ - id: $$cap_backup_path
+ label: Backup path
+ defaultValue: '/backups'
+ description: Path where you want to store the backups
+ - id: $$cap_backup_filename
+ label: Backup filename
+ defaultValue: 'backup-%Y-%m-%dT%H-%M-%S.tar.gz'
+ description: The name of the backup file including the `.tar.gz` extension. Format verbs will be replaced as in `strftime`. Omitting them will result in the same filename for every backup run, which means previous versions will be overwritten on subsequent runs. The default results in filenames like `backup-2021-08-29T04-00-00.tar.gz`.
+ - id: $$cap_backup_cron_expression
+ label: Cron expression
+ defaultValue: '@daily'
+ description: Backups run on the given cron schedule in `busybox` flavor. If no value is set, `@daily` will be used. If you do not want the cron to ever run, use `0 0 5 31 2 ?`.
+ - id: $$cap_backup_retention_days
+ label: Backup retention days
+ defaultValue: '14'
+ description: Define this value to enable automatic rotation of old backups. The value declares the number of days for which a backup is kept.
+ instructions:
+ start: >-
+ Backup Docker volumes locally. See https://github.com/offen/docker-volume-backup.
+ end: >-
+ Aaaand you're done! 😄
+ Your service is up and running
+ displayName: Docker volume backup
+ isOfficial: true
+ description: Backup Docker volumes locally
+ documentation: Taken from https://github.com/offen/docker-volume-backup