sethgoldin / davinci-resolve-postgresql-workflow-tools

Effortlessly set up automatic backups and automatic optimizations of DaVinci Resolve Studio's PostgreSQL databases
Other
80 stars 11 forks source link

0 bytes #37

Closed paulc-us closed 1 year ago

paulc-us commented 1 year ago

For some reason, when the launchd runs. The backup has 0 bytes. If I run the backup sh manually, it is a normal size. The log says that it ran successfully. Any ideas?

sethgoldin commented 1 year ago

I've seen this before. Often it's been because the destination directory has some kind of unescaped space or unescaped special character. What's the full path of your destination directory?

sethgoldin commented 1 year ago

It could also be a permissions issue, though the scripts should be running as root, so that'd be a bit curious.

If you're running an older version, it didn't used to run as root, so you might want to update.

sethgoldin commented 1 year ago

@paulc-us Can you send the command-line output of how you've set it up?

paulc-us commented 1 year ago

I am going to run the uninstall and then reinstall. Should I be running the script as root or with sudo?

paulc-us commented 1 year ago

I should also mention, I am still using Postgres 9.5. So I reran the install script as sudo. I unloaded the launchd for both backup and optimize. Then I edited the scripts to use 9.5 instead of 13. Then loaded the launchd's again.

Does that sound correct?

sethgoldin commented 1 year ago

@paulc-us 1.3 was written for PostgreSQL 9.5, but wasn't ever really tested on Ventura, because 2.0 was written for PostgreSQL 13 on Ventura.

When I was updating everything from 1.3 to 2.0, there was some kind of warning in the macOS Ventura shell, advising that it wasn't best practice to keep running it as a launchd agent, and that I should run it as a daemon so that the root user could run the script. Switching it to a daemon running from root eliminated the warning.

So on macOS, 1.3 ran as a user-specific agent, and in 2.0, it runs as a daemon from the root user. On 2.0, no other user even needs to be logged in.

Without knowing exactly how you've modified it, I suspect that you might be running into permissions issues. It should always be installed with sudo, as per the documentation in either version.

paulc-us commented 1 year ago

Maybe the issue is that it is running on a mini running Sierra, yikes. I went back to the old version of the backup script, for now. Once I upgrade the mac, I can try the new script.