https://github.com/mirantis/ucpbackup
https://github.com/mirantis/ucpbackup
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mirantis/ucpbackup
- Owner: Mirantis
- Created: 2018-10-26T18:09:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-05T18:45:29.000Z (about 5 years ago)
- Last Synced: 2025-01-28T12:37:36.188Z (4 months ago)
- Language: Shell
- Size: 1.95 KB
- Stars: 2
- Watchers: 85
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
### Usage
1) Load UCP client bundle
2) Create Docker Secret containing password for backup user
```
echo "password" | docker secret create backuppass -
```3) Schedule service
```
docker service create -d \
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
--mount source=dtrbackup,target=/tmp/backup \
--restart-condition=any \
--restart-delay 24h \
--constraint=node.role==manager \
support/ucpbackup:latest
``````
version: '3.7'
services:
dtr:
deploy:
restart_policy:
condition: any
delay: 24h
replicas: 1
placement:
constraints:
- node.role == worker
- node.labels.dtr == true
image: support/dtrbackup
environment:
UCP_USER: admin
UCP_URL: ucp.example.org
secrets:
- source: backuppass
target: password
volumes:
- source: dtrbackup
target: /backup
type: volume
- source: /var/run/docker.sock
target: /var/run/docker.sock
type: bind
ucp:
deploy:
restart_policy:
condition: any
delay: 24h
replicas: 1
placement:
constraints:
- node.role == manager
image: support/ucpbackup
environment:
UCP_USER: admin
UCP_URL: ucp.example.org
secrets:
- source: backuppass
target: password
volumes:
- source: ucpbackup
target: /backup
type: volume
- source: /var/run/docker.sock
target: /var/run/docker.sock
type: bindvolumes:
ucpbackup:
dtrbackup:
secrets:
backuppass:
external: true
```