Open Mikrokupu666 opened 8 months ago
Does the repo exist and has it been initialized?
I my suggestion for troubleshooting would be to try and run a borgmatic info
from the container. to see if it exists yet.
Does the repo exist and has it been initialized?
I my suggestion for troubleshooting would be to try and run a
borgmatic info
from the container. to see if it exists yet.
No the repo doesn't exist yet, because it runs into an error before it can make it.
I ran 'borgmatic info' on the server and it sure doesn't exist. Which is weird, because running the playbook didn't raise any errors.
sudo apt install borgbackup
on remote host (in your case it's myredactedip
)
Tried to set up borg backup. Installation went fine, no errors there. Also self-check goes through without errors. The problem arises when I try to execute the backup manually on the server with 'sudo systemctl start matrix-backup-borg'. The following is from 'journalctl -xeu matrix-backup-borg.service' I am using ubuntu server running in virtualbox as my backup server my matrix server is running in another one of those too.
Dec 22 14:37:50 synapse systemd[1]: Starting Borg Backup... ░░ Subject: A start job for unit matrix-backup-borg.service has begun execution ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ A start job for unit matrix-backup-borg.service has begun execution. ░░ ░░ The job identifier is 3342. Dec 22 14:37:52 synapse matrix-backup-borg[21328]: Remote: Warning: Permanently added 'myredactedip' to the list of known hosts. Dec 22 14:37:52 synapse matrix-backup-borg[21328]: Remote: bash: line 1: borg: command not found Dec 22 14:37:52 synapse matrix-backup-borg[21328]: Connection closed by remote host. Is borg working on the server? Dec 22 14:37:53 synapse matrix-backup-borg[21328]: Remote: bash: line 1: borg: command not found Dec 22 14:37:53 synapse matrix-backup-borg[21328]: Connection closed by remote host. Is borg working on the server? Dec 22 14:37:53 synapse matrix-backup-borg[21328]: ssh://myredacteduser@myredactedip/./backup_synapse: Error running actions for repository Dec 22 14:37:53 synapse matrix-backup-borg[21328]: Command 'borg init --encryption repokey-blake2 ssh://myredacteduser@myredactedip/./backup_synapse' returned non-zero exit status 2. Dec 22 14:37:53 synapse matrix-backup-borg[21328]: /etc/borgmatic.d/config.yaml: An error occurred Dec 22 14:37:53 synapse matrix-backup-borg[21328]: summary: Dec 22 14:37:53 synapse matrix-backup-borg[21328]: /etc/borgmatic.d/config.yaml: An error occurred Dec 22 14:37:53 synapse matrix-backup-borg[21328]: ssh://myredacteduser@myredactedip/./backup_synapse: Error running actions for repository Dec 22 14:37:53 synapse matrix-backup-borg[21328]: Command 'borg init --encryption repokey-blake2 ssh://myredacteduser@myredactedip/./backup_synapse' returned non-zero exit status 2. Dec 22 14:37:53 synapse matrix-backup-borg[21328]: Need some help? https://torsion.org/borgmatic/#issues Dec 22 14:37:56 synapse matrix-backup-borg[21452]: Remote: Warning: Permanently added 'myredactedip' to the list of known hosts. Dec 22 14:37:57 synapse matrix-backup-borg[21452]: Remote: bash: line 1: borg: command not found Dec 22 14:37:57 synapse matrix-backup-borg[21452]: Connection closed by remote host. Is borg working on the server? Dec 22 14:37:57 synapse matrix-backup-borg[21452]: ssh://myredacteduser@myredactedip/./backup_synapse: Error running actions for repository Dec 22 14:37:57 synapse matrix-backup-borg[21452]: Command 'borg create --exclude-from /tmp/tmp0ssne_qc --compression lz4 --one-file-system --read-special --stats ssh://myredacteduser@myredactedip/./backup_synapse::matrix-{now:%Y-%m-%d-%H%M%S} /etc/borgmatic.d/config.yaml /matrix /root/.borgmatic' returned non-zero exit status 2. Dec 22 14:37:57 synapse matrix-backup-borg[21452]: Error while creating a backup. Dec 22 14:37:57 synapse matrix-backup-borg[21452]: /etc/borgmatic.d/config.yaml: An error occurred Dec 22 14:37:57 synapse matrix-backup-borg[21452]: summary: Dec 22 14:37:57 synapse matrix-backup-borg[21452]: /etc/borgmatic.d/config.yaml: An error occurred Dec 22 14:37:57 synapse matrix-backup-borg[21452]: ssh://myredacteduser@myredactedip/./backup_synapse: Error running actions for repository Dec 22 14:37:57 synapse matrix-backup-borg[21452]: Remote: Warning: Permanently added 'myredactedip' to the list of known hosts. Dec 22 14:37:57 synapse matrix-backup-borg[21452]: Remote: bash: line 1: borg: command not found Dec 22 14:37:57 synapse matrix-backup-borg[21452]: Connection closed by remote host. Is borg working on the server? Dec 22 14:37:57 synapse matrix-backup-borg[21452]: Command 'borg create --exclude-from /tmp/tmp0ssne_qc --compression lz4 --one-file-system --read-special --stats ssh://myredacteduser@myredactedip/./backup_synapse::matrix-{now:%Y-%m-%d-%H%M%S} /etc/borgmatic.d/config.yaml /matrix /root/.borgmatic' returned non-zero exit status 2. Dec 22 14:37:57 synapse matrix-backup-borg[21452]: Need some help? https://torsion.org/borgmatic/#issues Dec 22 14:37:57 synapse systemd[1]: matrix-backup-borg.service: Main process exited, code=exited, status=1/FAILURE ░░ Subject: Unit process exited ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ An ExecStart= process belonging to unit matrix-backup-borg.service has exited. ░░ ░░ The process' exit code is 'exited' and its exit status is 1. Dec 22 14:37:57 synapse systemd[1]: matrix-backup-borg.service: Failed with result 'exit-code'. ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ The unit matrix-backup-borg.service has entered the 'failed' state with result 'exit-code'. Dec 22 14:37:57 synapse systemd[1]: Failed to start Borg Backup. ░░ Subject: A start job for unit matrix-backup-borg.service has failed ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ A start job for unit matrix-backup-borg.service has finished with a failure. ░░ ░░ The job identifier is 3342 and the job result is failed.
I have these in my vars.yml regarding borg
backup_borg_enabled: true backup_borg_location_repositories:
Can't figure out what is the problem. No errors in installation or self-check and everything seems to be correctly configured.
UPDATE: Problem is apparently related to my backup server as I managed to setup working borg backup to BorgBase. Still no idea what the problem is tho