k0lter / autopostgresqlbackup

Automated tool to make periodic backups of PostgreSQL databases
52 stars 17 forks source link

Problem in v2 (incomplete): Session terminated #14

Closed hyperman2 closed 1 year ago

hyperman2 commented 1 year ago

When using the su option and not running under cron but under my personal account

sudo autopostgresqlbackup

I get a lot of empty backup files (19 bytes, what happens when you zstd an empty file). only pg_dumpall works, the pg_dumps are empty. There is no error message or nothing interesting in the debug logging. If I keep the logs, I see this:

$ cat ~/ERRORS_localhost-351501695.log

Session terminated, killing shell...pg_dump: terminated by user ...killed.

hyperman2 commented 1 year ago

I see you're working on my issues. This one is incomplete and I don't really understand what's wrong. As I have a decent workaround (cron), I understand it if you're skipping this one and file it under: wait until more reports appear.

k0lter commented 1 year ago

I've push a fixed for a better error handling while dumping databases. I think that it could help in that case.

hyperman2 commented 1 year ago

I've closed the issues that seem to be completely fixed. I'll leave this one open, but feel free to do what you want with it.

In the next few days, I'll validate everything works as expected, and restore some databases to check for corruption.

k0lter commented 1 year ago

In the next few days, I'll validate everything works as expected, and restore some databases to check for corruption.

Did you get the opportunity to check the fix?

If it is ok for you, feel free to close this issue.

hyperman2 commented 1 year ago

Sorry, forgot about this one. autopostgresqlbackup works great. Thanks!