initial implementation for joplin
This commit is contained in:
11
.autorestic.yaml
Normal file
11
.autorestic.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
version: 2
|
||||
|
||||
locations:
|
||||
joplin:
|
||||
from: /source/joplin/data
|
||||
to: joplin-nfs
|
||||
|
||||
backends:
|
||||
joplin-nfs:
|
||||
type: local
|
||||
path: /backups/joplin
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
data/
|
||||
data/
|
||||
.env
|
||||
11
README.md
11
README.md
@@ -5,11 +5,20 @@
|
||||
- Joplin data
|
||||
- InfluxDB data
|
||||
|
||||
## Implementation
|
||||
|
||||
- 1 restic repo per service getting backed up
|
||||
- NFS share from NAS is mounted at `/mnt/backups` into the LXC
|
||||
- Reference: [[Tutorial] Mounting NFS share to an unprivileged LXC](https://forum.proxmox.com/threads/tutorial-mounting-nfs-share-to-an-unprivileged-lxc.138506/)
|
||||
- Needed to create the repo with the `restic/restic` image before running the `autorestic` service
|
||||
- Create at `/mnt/backups/<repo>` with `create_restic_repo.sh`
|
||||
|
||||
## Tools
|
||||
|
||||
### [restic / **restic**](https://github.com/restic/restic)
|
||||
|
||||
[Documentation](https://restic.readthedocs.io/en/stable/index.html)
|
||||
- [Documentation](https://restic.readthedocs.io/en/stable/index.html)
|
||||
- [DockerHub](https://hub.docker.com/r/restic/restic)
|
||||
|
||||
### [cupcakearmy / **autorestic**](https://github.com/cupcakearmy/autorestic)
|
||||
|
||||
|
||||
16
create_restic_repo.sh
Executable file
16
create_restic_repo.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "$(tput setaf 1)No repo name specified$(tput sgr0)"
|
||||
echo "Usage: $0 <repo name>"
|
||||
exit 1
|
||||
else
|
||||
# Assign the directory to a variable
|
||||
REPO_PATH=/mnt/backups/$1
|
||||
echo -e "Creating $(tput setaf 4)$REPO_PATH$(tput sgr0)"
|
||||
fi
|
||||
|
||||
docker run -it --rm \
|
||||
-v /mnt/backups:/mnt/backups \
|
||||
restic/restic \
|
||||
init --repo $REPO_PATH
|
||||
26
docker-compose.yml
Normal file
26
docker-compose.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
version: '3.9'
|
||||
|
||||
services:
|
||||
autorestic:
|
||||
image: cupcakearmy/autorestic:latest
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- .autorestic.yaml:/.autorestic.yaml
|
||||
- ../:/source:ro
|
||||
- backups:/backups
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
command: [
|
||||
"autorestic",
|
||||
"backup",
|
||||
"-va",
|
||||
"-c", "/.autorestic.yaml"
|
||||
]
|
||||
|
||||
volumes:
|
||||
backups:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: /mnt/backups
|
||||
Reference in New Issue
Block a user