pg_dump: [Errno 28] No space left on device #580

Closed
opened 2022-09-05 21:49:09 +00:00 by felixx9 · 3 comments

What I'm trying to do and why

I do have > 1 matrix servers up and running, deployed with https://github.com/spantaleev/matrix-docker-ansible-deploy

Included: borgmatic

Steps to reproduce (if a bug)

run the backup... (the one with the biggest database, but still not THAT big - postgres folder has a size of 52 GB

Actual behavior (if a bug)

when doing the pg_dump, backup stops after aprox. 30 minutes with.

Sep 05 16:15:42 v2202205159252190971 systemd[1]: Starting Matrix Borg Backup...
Sep 05 16:15:49 v2202205159252190971 matrix-backup-borg[1093387]: Remote: Warning: Permanently added 'borg.DOMAIN' (ED25519) to the list of known hosts.
Sep 05 16:18:11 v2202205159252190971 matrix-backup-borg[1093723]: Remote: Warning: Permanently added 'borg.DOMAIN' (ED25519) to the list of known hosts.
Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]: ------------------------------------------------------------------------------
Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]:                        Original size      Compressed size    Deduplicated size
Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]: Deleted data:              -47.40 GB            -46.68 GB            -17.29 MB
Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]: All archives:              206.73 GB            204.03 GB             61.70 GB
Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]:                        Unique chunks         Total chunks
Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]: Chunk index:                  240154               971153
Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]: ------------------------------------------------------------------------------
Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: /tmp/.borgmatic/postgresql_databases/matrix-postgres/synapse: read: [Errno 28] No space left on device
Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: borg@borg.DOMAIN:/home/borg/my_servers/REPO: Error running actions for repository
Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: Command 'pg_dump --no-password --clean --if-exists --host matrix-postgres --port 5432 --username matrix --format custom synapse > /tmp/.borgmatic/postgresql_databases/matrix-postgres/synapse' died with <Signals.SIGPIPE: 13>.
Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: Error while creating a backup.
Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: /etc/borgmatic.d/config.yaml: Error running configuration file
Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: summary:
Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: /etc/borgmatic.d/config.yaml: Error running configuration file
Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: borg@borg.DOMAIN:/home/borg/my_servers/REPO: Error running actions for repository
Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: Command 'pg_dump --no-password --clean --if-exists --host matrix-postgres --port 5432 --username matrix --format custom synapse > /tmp/.borgmatic/postgresql_databases/matrix-postgres/synapse' died with <Signals.SIGPIPE: 13>.
Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: Need some help? https://torsion.org/borgmatic/#issues
Sep 05 16:50:59 v2202205159252190971 systemd[1]: matrix-backup-borg.service: Main process exited, code=exited, status=1/FAILURE
Sep 05 16:50:59 v2202205159252190971 systemd[1]: matrix-backup-borg.service: Failed with result 'exit-code'.
Sep 05 16:50:59 v2202205159252190971 systemd[1]: Failed to start Matrix Borg Backup.

Expected behavior (if a bug)

finish backup - as with other (smaller), too.

Other notes / implementation ideas

Source and target volumes do have plenty of room left.

Environment

borgmatic version: should be latest, since I update very often.

Use sudo borgmatic --version or sudo pip show borgmatic | grep ^Version
Sorry - don't know how to, since these commands do not work on my machine.

borgmatic installation method: Container

Borg version: ?

Python version: ?

Database version (if applicable): PostgreSQL 14.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219, 64-bit

operating system and version: Debian GNU/Linux 11 (bullseye)

#### What I'm trying to do and why I do have > 1 matrix servers up and running, deployed with https://github.com/spantaleev/matrix-docker-ansible-deploy Included: borgmatic #### Steps to reproduce (if a bug) run the backup... (the one with the biggest database, but still not THAT big - postgres folder has a size of 52 GB #### Actual behavior (if a bug) when doing the pg_dump, backup stops after aprox. 30 minutes with. ``` Sep 05 16:15:42 v2202205159252190971 systemd[1]: Starting Matrix Borg Backup... Sep 05 16:15:49 v2202205159252190971 matrix-backup-borg[1093387]: Remote: Warning: Permanently added 'borg.DOMAIN' (ED25519) to the list of known hosts. Sep 05 16:18:11 v2202205159252190971 matrix-backup-borg[1093723]: Remote: Warning: Permanently added 'borg.DOMAIN' (ED25519) to the list of known hosts. Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]: ------------------------------------------------------------------------------ Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]: Original size Compressed size Deduplicated size Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]: Deleted data: -47.40 GB -46.68 GB -17.29 MB Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]: All archives: 206.73 GB 204.03 GB 61.70 GB Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]: Unique chunks Total chunks Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]: Chunk index: 240154 971153 Sep 05 16:20:45 v2202205159252190971 matrix-backup-borg[1093723]: ------------------------------------------------------------------------------ Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: /tmp/.borgmatic/postgresql_databases/matrix-postgres/synapse: read: [Errno 28] No space left on device Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: borg@borg.DOMAIN:/home/borg/my_servers/REPO: Error running actions for repository Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: Command 'pg_dump --no-password --clean --if-exists --host matrix-postgres --port 5432 --username matrix --format custom synapse > /tmp/.borgmatic/postgresql_databases/matrix-postgres/synapse' died with <Signals.SIGPIPE: 13>. Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: Error while creating a backup. Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: /etc/borgmatic.d/config.yaml: Error running configuration file Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: summary: Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: /etc/borgmatic.d/config.yaml: Error running configuration file Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: borg@borg.DOMAIN:/home/borg/my_servers/REPO: Error running actions for repository Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: Command 'pg_dump --no-password --clean --if-exists --host matrix-postgres --port 5432 --username matrix --format custom synapse > /tmp/.borgmatic/postgresql_databases/matrix-postgres/synapse' died with <Signals.SIGPIPE: 13>. Sep 05 16:50:59 v2202205159252190971 matrix-backup-borg[1093723]: Need some help? https://torsion.org/borgmatic/#issues Sep 05 16:50:59 v2202205159252190971 systemd[1]: matrix-backup-borg.service: Main process exited, code=exited, status=1/FAILURE Sep 05 16:50:59 v2202205159252190971 systemd[1]: matrix-backup-borg.service: Failed with result 'exit-code'. Sep 05 16:50:59 v2202205159252190971 systemd[1]: Failed to start Matrix Borg Backup. ``` #### Expected behavior (if a bug) finish backup - as with other (smaller), too. #### Other notes / implementation ideas Source and target volumes do have plenty of room left. #### Environment **borgmatic version:** should be latest, since I update very often. Use `sudo borgmatic --version` or `sudo pip show borgmatic | grep ^Version` Sorry - don't know how to, since these commands do not work on my machine. **borgmatic installation method:** Container **Borg version:** ? **Python version:** ? **Database version (if applicable):** PostgreSQL 14.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219, 64-bit **operating system and version:** Debian GNU/Linux 11 (bullseye)
Owner

Looking at the way that matrix-docker-ansible-deploy installs borgmatic, it's from a borgmatic Docker container project I haven't heard of before. I'm not sure exactly what version it's using, but the container was last built 5 months ago using Alpine latest, so my guess is it's running borgmatic 1.5.x or so. You can likely verify by docker execing into the running borgmatic container and then running borgmatic --version.

Anyway, the container is constructed without any volumes for Borg or borgmatic cache files, which means that any of those files that Borg/borgmatic writes to the container's filesystem just get stored in RAM instead of ever hitting disk. My guess is that your RAM is filling up as Borg writes its cache files (borgmatic doesn't cache much), and therefore the borgmatic process is dying with a "disk full" error.

Now that's just a guess, but I think it's likely. You can check the hypothesis by watching the container's memory usage as borgmatic runs. E.g.: sudo docker stats. If it's consuming tons of RAM, it might be because of the lack of cache volumes.

My recommendation to solve this? Convince the container's maintainer to add formal support for cache volumes, map in your own cache volumes (~/.cache/borg might do it?), or use a different container. Here's the borgmatic Docker container I use on my own systems: https://hub.docker.com/r/b3vis/borgmatic/. It does include cache volume support. I realize it may not be a drop-in replacement within the matrix-docker-ansible-deploy project.

I hope some of this helps! Let me know what you end up doing.

Looking at the way that `matrix-docker-ansible-deploy` installs borgmatic, it's from a [borgmatic Docker container project](https://gitlab.com/etke.cc/borgmatic) I haven't heard of before. I'm not sure exactly what version it's using, but the container was last built 5 months ago using Alpine latest, so my guess is it's running borgmatic 1.5.x or so. You can likely verify by [`docker exec`](https://docs.docker.com/engine/reference/commandline/exec/)ing into the running borgmatic container and then running `borgmatic --version`. Anyway, the container is constructed without any volumes for Borg or borgmatic cache files, which means that any of those files that Borg/borgmatic writes to the container's filesystem just get stored in RAM instead of ever hitting disk. My guess is that your RAM is filling up as Borg writes its cache files (borgmatic doesn't cache much), and therefore the borgmatic process is dying with a "disk full" error. Now that's just a guess, but I think it's likely. You can check the hypothesis by watching the container's memory usage as borgmatic runs. E.g.: `sudo docker stats`. If it's consuming tons of RAM, it _might_ be because of the lack of cache volumes. My recommendation to solve this? Convince the container's maintainer to add formal support for cache volumes, map in your own cache volumes (`~/.cache/borg` might do it?), or use a different container. Here's the borgmatic Docker container I use on my own systems: https://hub.docker.com/r/b3vis/borgmatic/. It does include cache volume support. I realize it may not be a drop-in replacement within the `matrix-docker-ansible-deploy` project. I hope some of this helps! Let me know what you end up doing.
witten added the
question / support
label 2022-09-05 22:13:14 +00:00
Author

Thank you
Sound's reasonable.
Since I'm still in learnig even to read ansible and docker, I might just deactivate the "deafault" and install the b3vis/borgmatic container, mentioned by you.

Could this playbook be an simple(r) alternitive?
https://github.com/borgbase/ansible-role-borgbackup

Obviously, best would be, to fix the playbook somehow.

Thx a lot for your input!

Thank you Sound's reasonable. Since I'm still in learnig even to read ansible and docker, I might just deactivate the "deafault" and install the b3vis/borgmatic container, mentioned by you. Could this playbook be an simple(r) alternitive? https://github.com/borgbase/ansible-role-borgbackup Obviously, best would be, to fix the playbook somehow. Thx a lot for your input!
Owner

Yes, I'd recommend that Ansible role if you'd like to use Ansible + borgmatic. It doesn't use Docker (except for tests), so the Borg cache should use your native disk. Not that there's anything wrong with using Docker; it just needs to be set up properly.

Yes, I'd recommend that Ansible role if you'd like to use Ansible + borgmatic. It doesn't use Docker (except for tests), so the Borg cache should use your native disk. Not that there's anything wrong with using Docker; it just needs to be set up properly.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#580
No description provided.