Closed altsalt closed 1 year ago
I just tried running the updated version with a fresh borgbase and got this error:
Aug 04 21:24:23 TLD systemd[1]: Starting Borg Backup...
Aug 04 21:24:29 TLD matrix-backup-borg[1501918]: Repository /repository does not exist.
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: Local Exception
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: Traceback (most recent call last):
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: File "/usr/lib/python3.11/site-packages/borg/archiver.py", line 5213, in main
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: exit_code = archiver.run(args)
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: ^^^^^^^^^^^^^^^^^^
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: File "/usr/lib/python3.11/site-packages/borg/archiver.py", line 5144, in run
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: return set_ec(func(args))
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: ^^^^^^^^^^
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: File "/usr/lib/python3.11/site-packages/borg/archiver.py", line 168, in wrapper
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: with repository:
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: File "/usr/lib/python3.11/site-packages/borg/repository.py", line 198, in __enter__
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: self.create(self.path)
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: File "/usr/lib/python3.11/site-packages/borg/repository.py", line 279, in create
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: os.mkdir(path)
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: OSError: [Errno 30] Read-only file system: '/repository'
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: Platform: Linux 3b4316e81e23 5.10.0-23-amd64 #1 SMP Debian 5.10.179-2 (2023-07-14) x86_64
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: Linux: Unknown Linux
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: Borg: 1.2.4 Python: CPython 3.11.4 msgpack: 1.0.5 fuse: None [pyfuse3,llfuse]
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: PID: 11 CWD: /
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: sys.argv: ['/usr/bin/borg', 'init', '--encryption', 'repokey-blake2', 'repository']
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: SSH_ORIGINAL_COMMAND: None
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: repository: Error running actions for repository
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: Command 'borg init --encryption repokey-blake2 repository' returned non-zero exit status 2.
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: /etc/borgmatic.d/config.yaml: An error occurred
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: summary:
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: /etc/borgmatic.d/config.yaml: An error occurred
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: repository: Error running actions for repository
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: Command 'borg init --encryption repokey-blake2 repository' returned non-zero exit status 2.
Aug 04 21:24:30 TLD matrix-backup-borg[1501918]: Need some help? https://torsion.org/borgmatic/#issues
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: repository: Error running actions for repository
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: Command '('borg', 'create', '--exclude-from', '/tmp/tmpe3unb7vs', '--compression', 'lz4', '--one-file-system', '--read-special', 'repository::matrix-{now:%Y-%m-%d-%H%M%S}', '/etc/borgmatic.d/config.yaml', '/matrix', '/root/.borgmatic', '--dry-run', '--list')' returned non-zero exit status 1.
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: Error while creating a backup.
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: /etc/borgmatic.d/config.yaml: An error occurred
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: summary:
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: /etc/borgmatic.d/config.yaml: An error occurred
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: repository: Error running actions for repository
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: b"- /etc/borgmatic.d/config.yaml\n- /matrix/git_hash.yml\n- /matrix/vars.yml\n- /matrix/static-files/.well-known/matrix/client\n- /matrix/static-files/.well-known/matrix/server\n- /matrix/static-files/.well-known/matrix\n- /matrix/static-files/.well-known\n- /matrix/static-files\n- /matrix/postgres/env-postgres-psql\n- /matrix/postgres/env-postgres-server\n- /matrix/postgres/bin/cli\n- /matrix/postgres/bin/cli-non-interactive\n- /matrix/postgres/bin/dump-all\n- /matrix/postgres/bin\n- /matrix/postgres/data/postmaster.pid\n- /matrix/postgres/data/core\n- /matrix/postgres/data/pg_wal/00000001000000C900000065\n- /matrix/postgres/data/pg_wal/00000001000000C90000005C\n- /matrix/postgres/data/pg_wal/00000001000000C90000000F\n- /matrix/postgres/data/pg_wal/00000001000000C900000034\n- /matrix/postgres/data/pg_wal/00000001000000C90000004D\n- /matrix/postgres/data/pg_wal/00000001000000C900000008\n- /matrix/postgres/data/pg_wal/00000001000000C900000054\n- /mat>
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: /3079\n- /matrix/postgres/data/base/13753/2692\n- /matrix/postgres/data/base/13753/2651\n- /matrix/postgres/data/base/13753/4151\n- /matrix/postgres/data/base/13753/2612\n- /matrix/postgres/data/base/13753/13572_fsm\n- /matrix/postgres/data/base/13753/2683\n- /matrix/postgres/data/base/13753/3600_fsm\n- /matrix/postgres/data/base/13753/3466\n- /matrix/postgres/data/base/13753/6176\n- /matrix/postgres/data/base/13753/1249_vm\n- /matrix/postgres/data/base/13753/2679\n- /matrix/postgres/data/base/13753/826\n- /matrix/postgres/data/base/13753/13577_fsm\n- /matrix/postgres/data/base/13753/3607\n- /matrix/postgres/data/base/13753/4152\n- /matrix/postgres/data/base/13753/6112\n- /matrix/postgres/data/base/13753/3712\n- /matrix/postgres/data/base/13753/2600_vm\n- /matrix/postgres/data/base/13753/3598\n- /matrix/postgres/data/base/13753/3380\n- /matrix/postgres/data/base/13753/4165\n- /matrix/postgres/data/base/13753/4173\n- /matrix/postgres/data/base/13753/>
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: gres/data/base/16386/833216\n- /matrix/postgres/data/base/16386/833217\n- /matrix/postgres/data/base/16386/833220\n- /matrix/postgres/data/base/16386/833221\n- /matrix/postgres/data/base/16386/833222\n- /matrix/postgres/data/base/16386/833223\n- /matrix/postgres/data/base/16386/833224\n- /matrix/postgres/data/base/16386/833225\n- /matrix/postgres/data/base/16386/833228\n- /matrix/postgres/data/base/16386/833229\n- /matrix/postgres/data/base/16386/833230\n- /matrix/postgres/data/base/16386/833231\n- /matrix/postgres/data/base/16386/833232\n- /matrix/postgres/data/base/16386/833233\n- /matrix/postgres/data/base/16386/833236\n- /matrix/postgres/data/base/16386/833237\n- /matrix/postgres/data/base/16386/833238\n- /matrix/postgres/data/base/16386/833239\n- /matrix/postgres/data/base/16386/833240\n- /matrix/postgres/data/base/16386/833243\n- /matrix/postgres/data/base/16386/833244\n- /matrix/postgres/data/base/16386/833245\n- /matrix/postgres/data/base/16>
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: t.log.438\n- /matrix/ssl/log/letsencrypt.log.428\n- /matrix/ssl/log/letsencrypt.log.281\n- /matrix/ssl/log/letsencrypt.log.437\n- /matrix/ssl/log/letsencrypt.log.286\n- /matrix/ssl/log/letsencrypt.log.285\n- /matrix/ssl/log/letsencrypt.log.282\n- /matrix/ssl/log/letsencrypt.log.280\n- /matrix/ssl/log/letsencrypt.log.279\n- /matrix/ssl/log/letsencrypt.log.278\n- /matrix/ssl/log/letsencrypt.log.277\n- /matrix/ssl/log/letsencrypt.log.276\n- /matrix/ssl/log/letsencrypt.log.275\n- /matrix/ssl/log/letsencrypt.log.241\n- /matrix/ssl/log/letsencrypt.log.245\n- /matrix/ssl/log/letsencrypt.log.274\n- /matrix/ssl/log/letsencrypt.log.271\n- /matrix/ssl/log/letsencrypt.log.270\n- /matrix/ssl/log/letsencrypt.log.260\n- /matrix/ssl/log/letsencrypt.log.269\n- /matrix/ssl/log/letsencrypt.log.268\n- /matrix/ssl/log/letsencrypt.log.253\n- /matrix/ssl/log/letsencrypt.log.266\n- /matrix/ssl/log/letsencrypt.log.272\n- /matrix/ssl/log/letsencrypt.log.259\n- /matrix/ssl/lo>
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: Command '('borg', 'create', '--exclude-from', '/tmp/tmpe3unb7vs', '--compression', 'lz4', '--one-file-system', '--read-special', 'repository::matrix-{now:%Y-%m-%d-%H%M%S}', '/etc/borgmatic.d/config.yaml', '/matrix', '/root/.borgmatic', '--dry-run', '--list')' returned non-zero exit status 1.
Aug 04 21:24:36 TLD matrix-backup-borg[1502053]: Need some help? https://torsion.org/borgmatic/#issues
Aug 04 21:24:37 TLD systemd[1]: matrix-backup-borg.service: Main process exited, code=exited, status=1/FAILURE
Aug 04 21:24:37 TLD systemd[1]: matrix-backup-borg.service: Failed with result 'exit-code'.
Aug 04 21:24:37 TLD systemd[1]: Failed to start Borg Backup.
Also tracked on https://gitlab.com/etke.cc/roles/backup_borg/-/issues/1
It looks like Borg is saying the repository doesn't exist and/or is on a read-only filesystem. Are either of those the case?
Shouldn't be, I created a new repo on borgbase and copied the info in as recommended. The recent update to the ansible playbook juggled a few things around so I'm guessing that's where this error will stem.
Yeah, it's fishy that the repository path appears to be /repository
in these errors. That doesn't look anything like your backup_borg_location_repositories
value.
Yeah, that was a typo in one of their variables which has now been resolved. However the base issue is still there and I posted a new log on the gitlab issue.
with the borgmatic v1.8.2 release the issue may be closed
Finally returned from my travels and confirmed this is working. Thanks!
Describe the bug
journald throws an error
/srv/repos/BORGBASEREPO/repo is not a valid repository. Check repo config.
when trying to deploy backups via borg.To Reproduce My
vars.yml
file looks like this:Running
systemctl start matrix-backup-borg
on the matrix server with a fresh BorgBase repository.Expected behavior
A backup should be pushed to the BorgBase repository.
Matrix Server:
Additional context
I've also filed an issue with borgbackup.