Files

62 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

2022-07-01 18:02:19 +02:00
## Example docker code
run this docker command to get up and running:
```
docker run -dp 3000:22 \
-e UID=$(id -u) \
-e GID=$(id -g) \
-v "$PWD"/sshkeys:/sshkeys \
-v "$PWD"/backups:/backups \
daniel156161/borgbackup-ssh:tagname
```
2022-07-01 18:01:23 +02:00
## Use after setup
```
2022-07-01 18:23:54 +02:00
export BORG_REPO='ssh://borg@localhost:3000/backups'
2022-07-01 18:01:23 +02:00
borg init -e none
# any borg command you like
```
2021-12-30 04:59:27 +01:00
2022-07-01 18:02:19 +02:00
2022-07-01 18:01:23 +02:00
## SSH Keys
2021-12-30 04:59:27 +01:00
they are into the Container Folder /sshkeys
- **Client Keys** /sshkeys/clients: add the Public Key with the Hostname.pub
- **Server Keys** /sshkeys/host: will be here after Server generate them
2022-07-01 18:01:23 +02:00
2021-12-30 04:59:27 +01:00
## BorgBackup Repo
borgBackup Repo can be into any Folder you like but i put it into /backups :3
2022-07-01 18:01:23 +02:00
## Maintain Borg Repo - not into 1.1.17
2022-06-30 22:14:28 +02:00
Use ENV MAINTENANCE_ENABLE="true" and bind your contab file into /crontab.txt and bind your script to / too its easier with the Crontab file
2022-07-01 18:01:23 +02:00
## Logs - not into 1.1.17
Create New Volumen into /logs if you like to log anything or get the logs
2021-12-30 04:59:27 +01:00
2022-07-01 18:01:23 +02:00
## Set Timezone - not into 1.1.17
2022-07-01 08:28:45 +02:00
Use ENV TZ="Your time zone" if not set will use UTC
2023-07-06 22:49:49 +02:00
## Export Data to Grafana and Prometheus - not into 1.1.17
Borg exporter for Prometheus from https://github.com/mad-ady/prometheus-borg-exporter
Use ENV RUN_PROMETHEUS_EXPORTER and set it to any CRONJOB TASK like ```0 * * * *``` to update the /logs/borg_exporter.prom every hour
Config is into ```/etc/borg_exporter.rc``` sample config:
```
BORG_PASSPHRASE=""
REPOSITORY=""
PUSHGATEWAY_URL=""
BASEREPODIR="/backups"
```
2021-12-30 04:59:27 +01:00
## borgbackup Version into Tags
2022-06-30 22:14:28 +02:00
| TAG | Borg Backup Version | Alpine Version |
| ----------- | ----------- | ----------- |
2022-12-09 15:06:56 +01:00
| lastest | 1.2.2 | edge |
2022-07-01 18:01:23 +02:00
| stable | 1.2.0 | latest |
2022-06-30 22:14:28 +02:00
| 1.1.17 | 1.1.17 | not know any more |
2021-12-30 04:59:27 +01:00
2022-07-01 18:01:23 +02:00
more will be come