I have set up kopia server to back up a few directories each night. Most of the time, this succeeds but occasionally kopia will not have sufficient permissions to access one or two sub-directories of a directory to back up.
12:11:13.381 [kopia/upload] unable to hash file "./postgres/pg_stat_tmp/db_0.stat": unable to open file: open /var/data/postgres/pg_stat_tmp/db_0.stat: permission denied, ignoring
12:11:13.381 [kopia/upload] unable to hash file "./postgres/pg_stat_tmp/db_1.stat": unable to open file: open /var/data/postgres/pg_stat_tmp/db_1.stat: permission denied, ignoring
12:11:13.381 [kopia/upload] unable to hash file "./postgres/pg_stat_tmp/db_13067.stat": unable to open file: open /var/data/postgres/pg_stat_tmp/db_13067.stat: permission denied, ignoring
12:11:13.381 [kopia/upload] unable to hash file "./postgres/pg_stat_tmp/db_16384.stat": unable to open file: open /var/data/postgres/pg_stat_tmp/db_16384.stat: permission denied, ignoring
12:11:13.381 [kopia/upload] unable to hash file "./postgres/pg_stat_tmp/db_16386.stat": unable to open file: open /var/data/postgres/pg_stat_tmp/db_16386.stat: permission denied, ignoring
12:11:13.381 [kopia/upload] unable to hash file "./postgres/pg_stat_tmp/db_16388.stat": unable to open file: open /var/data/postgres/pg_stat_tmp/db_16388.stat: permission denied, ignoring
12:11:13.381 [kopia/upload] unable to hash file "./postgres/pg_stat_tmp/db_16516.stat": unable to open file: open /var/data/postgres/pg_stat_tmp/db_16516.stat: permission denied, ignoring
12:11:13.381 [kopia/upload] unable to hash file "./postgres/pg_stat_tmp/db_17183.stat": unable to open file: open /var/data/postgres/pg_stat_tmp/db_17183.stat: permission denied, ignoring
12:11:13.381 [kopia/upload] unable to hash file "./postgres/pg_stat_tmp/db_18529.stat": unable to open file: open /var/data/postgres/pg_stat_tmp/db_18529.stat: permission denied, ignoring
12:11:13.381 [kopia/upload] unable to hash file "./postgres/pg_stat_tmp/db_24972.stat": unable to open file: open /var/data/postgres/pg_stat_tmp/db_24972.stat: permission denied, ignoring
12:11:13.381 [kopia/upload] unable to hash file "./postgres/pg_stat_tmp/global.stat": unable to open file: open /var/data/postgres/pg_stat_tmp/global.stat: permission denied, ignoring
For the automatic snapshot to be created by the server, an upload error occurs instead. From the output is appears that some chunks are uploaded, but no actual snapshot is created (kopia snapshot list
shows no entries).
[...]
Jan 26 03:00:19 h2594255 kopia[19861]: 03:00:19.726 [kopia/cli] processing upload 'pb6a88a0c30adeb5cb815e98b7722bf01' 21.3 MB of 22.8 MB (93%)#033[0m
Jan 26 03:00:19 h2594255 kopia[19861]: 03:00:19.847 [kopia/cli] processing upload 'pb6a88a0c30adeb5cb815e98b7722bf01' 22.3 MB of 22.8 MB (97%)#033[0m
Jan 26 03:00:20 h2594255 kopia[19861]: #033[32m03:00:20.612 [kopia/cli] completed upload 'pb6a88a0c30adeb5cb815e98b7722bf01' 22.8 MB#033[0m
Jan 28 03:01:02 h2594255 kopia[19861]: #033[31m03:01:02.364 [kopia/server] upload error: unable to process directory "influxdb": unable to process directory "wal": unable to process directory "_internal":
unable to process directory "monitor": unable to process directory "15": open /var/data/influxdb/wal/_internal/monitor/15: permission denied#033[0m
[...]
$ kopia snapshot gc
12:18:31.362 [kopia/snapshot/gc] looking for active contents
12:18:31.363 [kopia/upload] processed(0/6) active 1
12:18:32.029 [kopia/snapshot/gc] looking for unreferenced contents
12:18:32.047 [kopia/snapshot/gc] found 123 unused contents (103.5 MiB bytes)
12:18:32.047 [kopia/snapshot/gc] found 31 unused contents that are too recent to delete (12.8 MiB bytes)
12:18:32.047 [kopia/snapshot/gc] found 4310 in-use contents (6.2 GiB bytes)
12:18:32.047 [kopia/snapshot/gc] found 3 in-use system-contents (3.5 KiB bytes)
Is there any chance to force kopia to create automatic snapshots even if some directories are not accessible?