kopia lustrzana https://github.com/borgmatic-collective/docker-borgmatic
Changed volumes to defaults
- Moved .cache .config into /root - Moved source and borg-repository to /mnt - Added description for .config - harmonized order of the description and example - Used /opt/docker/borgmatic/data/ as location for the examplepull/23/head
rodzic
894a8e75fa
commit
9a20dd9906
48
README.md
48
README.md
|
@ -17,12 +17,13 @@ If using remote repositories mount your .ssh to /root/.ssh within the container
|
|||
```
|
||||
docker run \
|
||||
--detach --name borgmatic \
|
||||
-v /home:/source/home:ro \
|
||||
-v /mnt/borg:/repository \
|
||||
-v /home/user/.ssh:/root/.ssh \
|
||||
-v /srv/borgmatic/config:/config \
|
||||
-v /srv/borgmatic/borgmatic.d:/etc/borgmatic.d/
|
||||
-v /srv/borgmatic/cache:/cache \
|
||||
-v /home:/mnt/source:ro \
|
||||
-v /var/opt/borg:/mnt/borg-repository \
|
||||
-v /opt/docker/borgmatic/data/borgmatic.d:/etc/borgmatic.d/ \
|
||||
-v /opt/docker/borgmatic/data/.config:/root/.config/borg \
|
||||
-v /opt/docker/borgmatic/data/.ssh:/root/.ssh \
|
||||
-v /opt/docker/borgmatic/data/.cache:/root/.cache/borg \
|
||||
-e TZ=Europe/Berlin \
|
||||
b3vis/borgmatic
|
||||
```
|
||||
While the parameters above are sufficient for regular backups, following additional privileges will be needed to mount an archive as FUSE filesystem:
|
||||
|
@ -35,30 +36,27 @@ While the parameters above are sufficient for regular backups, following additio
|
|||
Depending on your security system, `--security-opt` parameters may not be neccessary. `label:disable` is needed for *SELinux*, while `apparmor:unconfined` is needed for *AppArmor*.
|
||||
|
||||
### Layout
|
||||
|
||||
#### /config
|
||||
Where you need to create crontab.txt and your borgmatic config.yml
|
||||
|
||||
#### crontab.txt example
|
||||
In this file set the time you wish for your backups to take place default is 1am every day. In here you can add any other tasks you want ran
|
||||
```
|
||||
0 1 * * * PATH=$PATH:/usr/bin /usr/bin/borgmatic -c /config --stats -v 0 2>&1
|
||||
```
|
||||
#### /cache
|
||||
A non volatile place to store the borg chunk cache
|
||||
#### /source
|
||||
Your data you wish to backup
|
||||
#### /repository
|
||||
Mount your borg backup repository here
|
||||
#### /root/.ssh
|
||||
Mount either your own .ssh here or create a new one with ssh keys in for your remote repo locations
|
||||
#### /mnt/source
|
||||
Your data you wish to backup. For *some* safety you may want to mount read-only. Borgmatic is running as root so all files can be backed up.
|
||||
#### /mnt/borg-repository
|
||||
Mount your borg backup repository here.
|
||||
#### /etc/borgmatic.d
|
||||
Mount your borgmatic configuration file(s) here. To generate an example configuration, run:
|
||||
Where you need to create crontab.txt and your borgmatic config.yml
|
||||
- To generate an example borgmatic configuration, run:
|
||||
```
|
||||
docker exec borgmatic \
|
||||
sh -c "generate-borgmatic-config -d /etc/borgmatic.d/config.yaml"
|
||||
```
|
||||
- crontab.txt example: In this file set the time you wish for your backups to take place default is 1am every day. In here you can add any other tasks you want ran
|
||||
```
|
||||
0 1 * * * PATH=$PATH:/usr/bin /usr/bin/borgmatic --stats -v 0 2>&1
|
||||
```
|
||||
#### /root/.config/borg
|
||||
Here your borg config and keyfiles are stored. Make sure to backup your keyfiles when using encryption!
|
||||
#### /root/.ssh
|
||||
Mount either your own .ssh here or create a new one with ssh keys in for your remote repo locations.
|
||||
#### /root/.cache/borg
|
||||
A non volatile place to store the borg chunk cache.
|
||||
### Environment
|
||||
|
||||
#### TZ
|
||||
You can set TZ to specify a time zone, `Europe/Berlin`.
|
||||
|
|
Ładowanie…
Reference in New Issue