BORG Can't backup

Hi everyone,

I’m using nextcloud-aio and docker and everything is working fine. Except Borg who can’t backup with the following logs :

Backup container logs :

configuration.json not present. Cannot perform the backup!
/usr/bin/start.sh: line 42: /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list: No such file or directory
chmod: cannot access ‘/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list’: No such file or directory

Docker-compose :

version: “3.8”

services:
caddy:
image: caddy:latest
container_name: caddy
restart: always
ports:
- “80:80”
- “443:443”
environment:
DOMAIN: domain
EMAIL: mail
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
- ./caddy/data:/data
networks:
- reverse-proxy

nextcloud:
image: nextcloud/all-in-one:latest
container_name: nextcloud-aio-mastercontainer
restart: always
ports:
- “8081:8080”
depends_on:
- caddy
environment:
APACHE_PORT: ‘11000’
NEXTCLOUD_DATADIR: /home/user/remote/appdata/nextcloud-data
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /mnt/backup:/mnt/backup
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- reverse-proxy

Does someone know why ?

Do I need to mount the backup directory ? If not how can the container access the host path without mapping ?

Beacuse configuration.json not present.

Hi, can you please show the output of sudo docker inspect nextcloud-aio-mastercontainer ? Thanks!

Hi thanks for your interest in my problem !

See the output below :

[
{
“Id”: “03e8e8b5391f1cddf99edd2196fb322822e9a9968f3c94fc2c7bf8b31132c73e”,
“Created”: “2022-06-24T09:18:08.763527871Z”,
“Path”: “start.sh”,
“Args”: [
“/usr/bin/supervisord”,
“-c”,
“/supervisord.conf”
],
“State”: {
“Status”: “running”,
“Running”: true,
“Paused”: false,
“Restarting”: false,
“OOMKilled”: false,
“Dead”: false,
“Pid”: 500071,
“ExitCode”: 0,
“Error”: “”,
“StartedAt”: “2022-06-24T09:18:09.379375647Z”,
“FinishedAt”: “0001-01-01T00:00:00Z”
},
“Image”: “sha256:7aa880b3226a6fef7ecc690094d2a0382d6c7f3e21264781d68e2daa4fca61c3”,
“ResolvConfPath”: “/var/lib/docker/containers/03e8e8b5391f1cddf99edd2196fb322822e9a9968f3c94fc2c7bf8b31132c73e/resolv.conf”,
“HostnamePath”: “/var/lib/docker/containers/03e8e8b5391f1cddf99edd2196fb322822e9a9968f3c94fc2c7bf8b31132c73e/hostname”,
“HostsPath”: “/var/lib/docker/containers/03e8e8b5391f1cddf99edd2196fb322822e9a9968f3c94fc2c7bf8b31132c73e/hosts”,
“LogPath”: “/var/lib/docker/containers/03e8e8b5391f1cddf99edd2196fb322822e9a9968f3c94fc2c7bf8b31132c73e/03e8e8b5391f1cddf99edd2196fb322822e9a9968f3c94fc2c7bf8b31132c73e-json.log”,
“Name”: “/nextcloud-aio-mastercontainer”,
“RestartCount”: 0,
“Driver”: “overlay2”,
“Platform”: “linux”,
“MountLabel”: “”,
“ProcessLabel”: “”,
“AppArmorProfile”: “docker-default”,
“ExecIDs”: null,
“HostConfig”: {
“Binds”: [
“/mnt/backup:/mnt/backup:rw”,
“/var/run/docker.sock:/var/run/docker.sock:ro”,
“services_nextcloud_aio_mastercontainer:/mnt/docker-aio-config:rw”
],
“ContainerIDFile”: “”,
“LogConfig”: {
“Type”: “json-file”,
“Config”: {}
},
“NetworkMode”: “reverse-proxy”,
“PortBindings”: {
“8080/tcp”: [
{
“HostIp”: “”,
“HostPort”: “8081”
}
]
},
“RestartPolicy”: {
“Name”: “always”,
“MaximumRetryCount”: 0
},
“AutoRemove”: false,
“VolumeDriver”: “”,
“VolumesFrom”: ,
“CapAdd”: null,
“CapDrop”: null,
“CgroupnsMode”: “private”,
“Dns”: null,
“DnsOptions”: null,
“DnsSearch”: null,
“ExtraHosts”: null,
“GroupAdd”: null,
“IpcMode”: “private”,
“Cgroup”: “”,
“Links”: null,
“OomScoreAdj”: 0,
“PidMode”: “”,
“Privileged”: false,
“PublishAllPorts”: false,
“ReadonlyRootfs”: false,
“SecurityOpt”: null,
“UTSMode”: “”,
“UsernsMode”: “”,
“ShmSize”: 67108864,
“Runtime”: “runc”,
“ConsoleSize”: [
0,
0
],
“Isolation”: “”,
“CpuShares”: 0,
“Memory”: 0,
“NanoCpus”: 0,
“CgroupParent”: “”,
“BlkioWeight”: 0,
“BlkioWeightDevice”: null,
“BlkioDeviceReadBps”: null,
“BlkioDeviceWriteBps”: null,
“BlkioDeviceReadIOps”: null,
“BlkioDeviceWriteIOps”: null,
“CpuPeriod”: 0,
“CpuQuota”: 0,
“CpuRealtimePeriod”: 0,
“CpuRealtimeRuntime”: 0,
“CpusetCpus”: “”,
“CpusetMems”: “”,
“Devices”: null,
“DeviceCgroupRules”: null,
“DeviceRequests”: null,
“KernelMemory”: 0,
“KernelMemoryTCP”: 0,
“MemoryReservation”: 0,
“MemorySwap”: 0,
“MemorySwappiness”: null,
“OomKillDisable”: null,
“PidsLimit”: null,
“Ulimits”: null,
“CpuCount”: 0,
“CpuPercent”: 0,
“IOMaximumIOps”: 0,
“IOMaximumBandwidth”: 0,
“MaskedPaths”: [
“/proc/asound”,
“/proc/acpi”,
“/proc/kcore”,
“/proc/keys”,
“/proc/latency_stats”,
“/proc/timer_list”,
“/proc/timer_stats”,
“/proc/sched_debug”,
“/proc/scsi”,
“/sys/firmware”
],
“ReadonlyPaths”: [
“/proc/bus”,
“/proc/fs”,
“/proc/irq”,
“/proc/sys”,
“/proc/sysrq-trigger”
]
},
“GraphDriver”: {
“Data”: {
“LowerDir”: “/var/lib/docker/overlay2/d95625f8657f8177fa410adf385abacca6d0e999b6c200566edc8b1229ef91ad-init/diff:/var/lib/docker/overlay2/adc7094e6f8fd4f5bc42bf003790be31d71ff1d341d654c156c146b83603a569/diff:/var/lib/docker/overlay2/bc0f9e78533306f616535b75d5410922dd5d531a6bc0d0b9ad35dc14441ef18c/diff:/var/lib/docker/overlay2/2bfef462c44d033479524f7210970011681d8cd53a3edcb5df118836b053e059/diff:/var/lib/docker/overlay2/3cc60775153aef41fab55ff4f31ed5e042f6e87fc7870a88939f0b2c42154f6b/diff:/var/lib/docker/overlay2/da4be8b7dbfbaf6f208c811605f6e40366652b3927956627fd436267e3335922/diff:/var/lib/docker/overlay2/a4306f6a3d5196d74f9ea3cf65f89b3ce7f77439172571fd6edb0023123754ad/diff:/var/lib/docker/overlay2/6f93a89e069e61b6fee056e33d5fbab636f088bbecc0048b5c83a33981f21fa1/diff:/var/lib/docker/overlay2/f6a179cfedf265ecd2ff8a5c191fcc0fd08523c6aeb55011edfe0722582cce05/diff:/var/lib/docker/overlay2/e2ba7ee686cb3b010fb206eaa58d91899135c2c3ec7670f0f93a0ad4ead4de15/diff:/var/lib/docker/overlay2/ba75463932118e02c95e4c29d3f5a9c9e333442a877a28cb78b174a62ba4982d/diff:/var/lib/docker/overlay2/33190cfb8bb596f39250a94078cad47cc081c6a684cd031f21ed576fe191becf/diff:/var/lib/docker/overlay2/dc634fa1ee0982804376c12e9d25f10e8cb14076dafe726af39dcdbd78e68a54/diff:/var/lib/docker/overlay2/f509f9824a3bfd81c8afb210340bcad7275e949ae071eff43437dee5eba8d0e8/diff:/var/lib/docker/overlay2/4949e4845b8227e2e48ad806523216a16695c9c352d76e5475dfd9c0a9e58227/diff:/var/lib/docker/overlay2/574a0361509a0d2585552ab6b2bfd212b71e0d3e515156db7586b7b4ad2b1f70/diff:/var/lib/docker/overlay2/1f31b3d20c2a746fba15902e95d65fb949cb64c3001aef5ba7c8a617ff430f2a/diff:/var/lib/docker/overlay2/20021ec1cc7f836a5de2717201d6cfffa19c7b2d5b7bea5253c3feabef0091e1/diff:/var/lib/docker/overlay2/428411be0cb1aad3c58776f1ed2846b28813e330494e30cfd1f773f51bb0f30c/diff:/var/lib/docker/overlay2/12a0b9194fcf1495ee6a33873fc6b6826a00831073a704737f4eee21f29c1448/diff:/var/lib/docker/overlay2/20535c09c6af8586edc49c2ec8cca35c65f9b5a2f4bfefb71619beb2a133ca33/diff:/var/lib/docker/overlay2/667dd570a9fb7bb8d622ff4582b541eb34bb2e7ff6bb2f48d7681ed12c3d04bf/diff:/var/lib/docker/overlay2/3c8bd48d79ab86d908bada1d2268a20f9d132e93d87ca78b0e4beb8a1a297666/diff:/var/lib/docker/overlay2/2493693feab80c51dcff851e6b8616cb993be3eff06cb4e1b5e6e593ffa080e9/diff:/var/lib/docker/overlay2/48410f1037893a497ff7453b02c28266436a5e4e8bd126010036a595d717ef4f/diff:/var/lib/docker/overlay2/a0560e086d32ea69fe24e2ecfee00ba6cc8a18025942b018ba2bf273727c3b31/diff:/var/lib/docker/overlay2/bd2754c6c0b970086dd345d3f52e62939e0c63a7e39940b41d648e35a16faf06/diff:/var/lib/docker/overlay2/f7c6b4811bdc5ef6cfdc7ce16b0e50853442fecc437e2c2896aa2dc4eeb5993d/diff:/var/lib/docker/overlay2/55835456926f9450a7455d29a3d43b9a1f51c6bf00d84088d2882b887fd77156/diff:/var/lib/docker/overlay2/1018c73696dbe3f389d9b57b3da61a0616c934df6950310335e27a04066a269a/diff:/var/lib/docker/overlay2/eda387d24903ec94ba717dc040578d72d8d939de990381061ef15ee5b98d1cdb/diff:/var/lib/docker/overlay2/c1db1d3d7478721746fc1aa93c816c75528464fa47f8d40b0f224efd27a07386/diff:/var/lib/docker/overlay2/daee9043345bd0e234b8ebbb661f3d6c5caddc5b3c34986e25e975e8f5d927bc/diff:/var/lib/docker/overlay2/d3923e45b886b077961b73147eb86b649e3cd9cf198c7a7f89d98c0fcbefb34a/diff:/var/lib/docker/overlay2/f9d752baeeca30dd0f7c5c98cec87d5aca7225a530ae2fb87f86ab33510f706f/diff:/var/lib/docker/overlay2/a9dc56656f91ed5c803943100bb2d3bba94c29657546942e008aa403c877cc42/diff:/var/lib/docker/overlay2/e6db55e07f6d0a2a3dab2a0c69bb3f7f02775c22970039bc9bb33b21d9710edf/diff”,
“MergedDir”: “/var/lib/docker/overlay2/d95625f8657f8177fa410adf385abacca6d0e999b6c200566edc8b1229ef91ad/merged”,
“UpperDir”: “/var/lib/docker/overlay2/d95625f8657f8177fa410adf385abacca6d0e999b6c200566edc8b1229ef91ad/diff”,
“WorkDir”: “/var/lib/docker/overlay2/d95625f8657f8177fa410adf385abacca6d0e999b6c200566edc8b1229ef91ad/work”
},
“Name”: “overlay2”
},
“Mounts”: [
{
“Type”: “bind”,
“Source”: “/var/run/docker.sock”,
“Destination”: “/var/run/docker.sock”,
“Mode”: “ro”,
“RW”: false,
“Propagation”: “rprivate”
},
{
“Type”: “volume”,
“Name”: “services_nextcloud_aio_mastercontainer”,
“Source”: “/var/lib/docker/volumes/services_nextcloud_aio_mastercontainer/_data”,
“Destination”: “/mnt/docker-aio-config”,
“Driver”: “local”,
“Mode”: “rw”,
“RW”: true,
“Propagation”: “”
},
{
“Type”: “bind”,
“Source”: “/mnt/backup”,
“Destination”: “/mnt/backup”,
“Mode”: “rw”,
“RW”: true,
“Propagation”: “rprivate”
}
],
“Config”: {
“Hostname”: “03e8e8b5391f”,
“Domainname”: “”,
“User”: “root”,
“AttachStdin”: false,
“AttachStdout”: false,
“AttachStderr”: false,
“ExposedPorts”: {
“80/tcp”: {},
“8080/tcp”: {},
“8443/tcp”: {}
},
“Tty”: false,
“OpenStdin”: false,
“StdinOnce”: false,
“Env”: [
“APACHE_PORT=11000”,
“NEXTCLOUD_DATADIR=/home/username/remote/appdata/nextcloud-data”,
“PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”,
“PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c”,
“PHP_INI_DIR=/usr/local/etc/php”,
“APACHE_CONFDIR=/etc/apache2”,
“APACHE_ENVVARS=/etc/apache2/envvars”,
“PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64”,
“PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64”,
“PHP_LDFLAGS=-Wl,-O1 -pie”,
“GPG_KEYS=xxx”,
“PHP_VERSION=8.0.20”,
“PHP_URL=https://www.php.net/distributions/php-8.0.20.tar.xz”,
“PHP_ASC_URL=https://www.php.net/distributions/php-8.0.20.tar.xz.asc”,
“PHP_SHA256=973fec765336ee01f47536a5db1c2eee98df9d34a41522b7b6c760159bf0a77b”
],
“Cmd”: [
“/usr/bin/supervisord”,
“-c”,
“/supervisord.conf”
],
“Image”: “nextcloud/all-in-one:latest”,
“Volumes”: {
“/mnt/backup”: {},
“/mnt/docker-aio-config”: {},
“/mnt/docker-aio-config/”: {},
“/var/run/docker.sock”: {}
},
“WorkingDir”: “/var/www/docker-aio”,
“Entrypoint”: [
“start.sh”
],
“OnBuild”: null,
“Labels”: {
“com.docker.compose.config-hash”: “31c9f8dfb495815ff517cf07bab15f81dd16ae353ef58a58c18e8f376a0d03e4”,
“com.docker.compose.container-number”: “1”,
“com.docker.compose.oneoff”: “False”,
“com.docker.compose.project”: “services”,
“com.docker.compose.project.config_files”: “docker-compose.yml”,
“com.docker.compose.project.working_dir”: “/home/username/services”,
“com.docker.compose.service”: “nextcloud”,
“com.docker.compose.version”: “1.29.2”
},
“StopSignal”: “SIGWINCH”
},
“NetworkSettings”: {
“Bridge”: “”,
“SandboxID”: “fde29a61f844c7bd0371f6c6061fcc67a9b049226fca09800eba918a12e47aa3”,
“HairpinMode”: false,
“LinkLocalIPv6Address”: “”,
“LinkLocalIPv6PrefixLen”: 0,
“Ports”: {
“80/tcp”: null,
“8080/tcp”: [
{
“HostIp”: “0.0.0.0”,
“HostPort”: “8081”
},
{
“HostIp”: “::”,
“HostPort”: “8081”
}
],
“8443/tcp”: null
},
“SandboxKey”: “/var/run/docker/netns/fde29a61f844”,
“SecondaryIPAddresses”: null,
“SecondaryIPv6Addresses”: null,
“EndpointID”: “”,
“Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“IPAddress”: “”,
“IPPrefixLen”: 0,
“IPv6Gateway”: “”,
“MacAddress”: “”,
“Networks”: {
“nextcloud-aio”: {
“IPAMConfig”: null,
“Links”: null,
“Aliases”: [
“03e8e8b5391f”
],
“NetworkID”: “2c11745890f23ca7dadec087f95090c7f97426e4d80ce19f5bc459894f989df7”,
“EndpointID”: “b4c40f3b104160aaa2ff16eff6c0b9d7a5573ca5d9cfa3df77de2ae9df042459”,
“Gateway”: “172.24.0.1”,
“IPAddress”: “172.24.0.2”,
“IPPrefixLen”: 16,
“IPv6Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“MacAddress”: “02:42:ac:18:00:02”,
“DriverOpts”: null
},
“reverse-proxy”: {
“IPAMConfig”: null,
“Links”: null,
“Aliases”: [
“03e8e8b5391f”,
“nextcloud”
],
“NetworkID”: “67c8845a43145c49b1ffc055d22a1687e659a225f01a26bcb38c04f3b7c630b7”,
“EndpointID”: “baf94729dd7d993756cb660917e7a48e3c62a484036e42a48546683c5320f086”,
“Gateway”: “172.20.0.1”,
“IPAddress”: “172.20.0.4”,
“IPPrefixLen”: 16,
“IPv6Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“MacAddress”: “02:42:ac:14:00:04”,
“DriverOpts”: null
}
}
}
}
]

Where can I found it and do you know how can I create it ? I followed the official documentation on GitHub : GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.

And I don’t find any mention of the configuration.json in there :0

This is the problem. The volume must be named nextcloud_aio_mastercontainer. Otherwise the backup will not work as you can see.

1 Like

My god that may be that !

this is my volume declaration :

volumes:
nextcloud_aio_mastercontainer:
driver: local

I think that I need to add something like a name statement, I try in a few hours and keep you updated !

1 Like

That was it, at the beginning I was using the part of the official docker-compose but because I had several other containers I used composer https://nuxx.io/ to manage my docker compose, that’s where the volume naming mistake happened !

Thanks a lot !

1 Like