Fix backup and dns

This commit is contained in:
Florent Guiotte 2025-01-29 14:43:36 +01:00
parent c34a490748
commit 3e065051b9
4 changed files with 14 additions and 7 deletions

View File

@ -6,6 +6,15 @@
## Setup
Setup DNS server for docker in `/etc/docker/daemon.json`:
```config
{
"data-root": "/home/docker",
"dns": ["1.1.1.1", "8.8.8.8", "8.8.4.4"]
}
```
Once DNS are properly setup on host:
1. Create OVH token : <https://www.ovh.com/auth/api/createToken>

View File

@ -15,7 +15,7 @@ from datetime import datetime
COMPOSE_PATH = Path('docker-compose.yml')
BACKUP_PATH = Path('/mnt/storage/docker-bkp')
BACKUP_PATH = Path('./data/bkp')
VOLUME_PREFIX = 'docker_'
@ -76,7 +76,7 @@ def backup(volume):
archive_name = f'{date_string}_{volume}.tar'
print(f'backup volume {volume} to {BACKUP_PATH}/{archive_name}')
subprocess.run(f'docker run --rm --volume {VOLUME_PREFIX}{volume}:/data --volume {BACKUP_PATH}:/bkp ubuntu tar -cf /bkp/{archive_name} -C /data .'.split())
subprocess.run(f'docker run --rm --volume {VOLUME_PREFIX}{volume}:/data --volume {BACKUP_PATH.resolve()}:/bkp ubuntu tar -cf /bkp/{archive_name} -C /data .'.split())
def run_docker_compose(cmd):

View File

@ -49,7 +49,6 @@ services:
- ddclient-cache:/run/ddclient-cache
#- ddclient-cache:/var/cache/ddclient
money:
image: ihatemoney/ihatemoney
container_name: money
@ -71,8 +70,9 @@ services:
FILE__PASS: /run/secrets/transmission-pw
volumes:
- transmission-config:/config
- /mnt/storage/download:/downloads
- /mnt/storage/download/torrent:/watch
- /storage/@media/download:/downloads
- /storage/@media/download/torrent:/watch
- ./transmission/eodl.sh:/eodl.sh
ports:
- 9091:9091
- 51413:51413
@ -140,7 +140,6 @@ services:
- sync-audrey:/audrey-sync
- ./data/signal-bkp:/signal-bkp
- ./data/audrey-projets:/audrey-projets
- /storage/@media/music/Florent:/music
ports:
- 22000:22000/tcp
- 22000:22000/udp
@ -375,7 +374,6 @@ services:
- gitea-db-root-pw
- gitea-db-pw
volumes:
money-data:
lychee-db:

Binary file not shown.