imporoved borgmatic
This commit is contained in:
@@ -310,3 +310,7 @@ KC_DB_PASSWORD=
|
|||||||
# This matches the default user inside the container and avoids permission issues when accessing files.
|
# This matches the default user inside the container and avoids permission issues when accessing files.
|
||||||
# Leaving it default stores data in docker internal volumes.
|
# Leaving it default stores data in docker internal volumes.
|
||||||
#RADICALE_DATA_DIR=/your/local/radicale/data
|
#RADICALE_DATA_DIR=/your/local/radicale/data
|
||||||
|
|
||||||
|
### borgbackup Settings ###
|
||||||
|
BORG_PASSPHRASE=vivid-garnet-lantern-oxide-sparrow-47-reef
|
||||||
|
PGHOST=postgres
|
||||||
@@ -34,8 +34,10 @@ BORG_PASSPHRASE=your-strong-passphrase
|
|||||||
2. Initialize the repository (first time only):
|
2. Initialize the repository (first time only):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f backup/borgmatic.yml run --rm borgmatic \
|
docker compose build borgmatic
|
||||||
borgmatic init --encryption repokey-blake2
|
|
||||||
|
docker compose run --rm borgmatic \
|
||||||
|
init --encryption repokey-blake2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -43,36 +45,40 @@ docker compose -f backup/borgmatic.yml run --rm borgmatic \
|
|||||||
### Run Manual Backup
|
### Run Manual Backup
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f backup/borgmatic.yml run --rm borgmatic \
|
docker compose build borgmatic
|
||||||
borgmatic --stats -v 1
|
|
||||||
|
docker compose run --rm borgmatic \
|
||||||
|
--stats -v 1
|
||||||
```
|
```
|
||||||
|
|
||||||
### Start Scheduled Backups
|
### Start Scheduled Backups
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f backup/borgmatic.yml up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
### List Archives
|
### List Archives
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f backup/borgmatic.yml run --rm borgmatic \
|
docker compose build borgmatic
|
||||||
borgmatic list
|
|
||||||
|
docker compose run --rm borgmatic \
|
||||||
|
list
|
||||||
```
|
```
|
||||||
|
|
||||||
### Restore
|
### Restore
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# List files in an archive
|
# List files in an archive
|
||||||
docker compose -f backup/borgmatic.yml run --rm borgmatic \
|
docker compose run --rm borgmatic \
|
||||||
borg list ::archive-name
|
borg list ::archive-name
|
||||||
|
|
||||||
# Extract entire archive
|
# Extract entire archive
|
||||||
docker compose -f backup/borgmatic.yml run --rm borgmatic \
|
docker compose run --rm borgmatic \
|
||||||
borg extract ::archive-name
|
borg extract ::archive-name
|
||||||
|
|
||||||
# Extract specific path
|
# Extract specific path
|
||||||
docker compose -f backup/borgmatic.yml run --rm borgmatic \
|
docker compose run --rm borgmatic \
|
||||||
borg extract ::archive-name source/gitea_data
|
borg extract ::archive-name source/gitea_data
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -80,7 +86,7 @@ docker compose -f backup/borgmatic.yml run --rm borgmatic \
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Extract dump from backup
|
# Extract dump from backup
|
||||||
docker compose -f backup/borgmatic.yml run --rm borgmatic \
|
docker compose run --rm borgmatic \
|
||||||
borg extract ::archive-name source/pgdumps/giteadb.dump
|
borg extract ::archive-name source/pgdumps/giteadb.dump
|
||||||
|
|
||||||
# Restore to database
|
# Restore to database
|
||||||
@@ -90,8 +96,10 @@ docker exec -i postgres pg_restore -U admin -d giteadb -c /path/to/giteadb.dump
|
|||||||
### Check Repository
|
### Check Repository
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f backup/borgmatic.yml run --rm borgmatic \
|
docker compose build borgmatic
|
||||||
borgmatic check
|
|
||||||
|
docker compose run --rm borgmatic \
|
||||||
|
check
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|||||||
@@ -34,15 +34,10 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
opencloud-config:
|
opencloud-config:
|
||||||
external: true
|
|
||||||
opencloud-data:
|
opencloud-data:
|
||||||
external: true
|
|
||||||
gitea_data:
|
gitea_data:
|
||||||
external: true
|
|
||||||
odoo-db-data:
|
odoo-db-data:
|
||||||
external: true
|
|
||||||
odoo-config:
|
odoo-config:
|
||||||
external: true
|
|
||||||
borg-repo:
|
borg-repo:
|
||||||
borgmatic-pgdumps:
|
borgmatic-pgdumps:
|
||||||
borgmatic-cache:
|
borgmatic-cache:
|
||||||
|
|||||||
Reference in New Issue
Block a user