Seth Goldin handles “tech, post-production, and workflow” at Freethink Media. He’s released a bash script for MacOS 10.12.6 to automate backing up and optimizing DaVinci Resolve 14 PostgreSQL databases.
[Note: if you’re running the free version of Resolve with default settings, you’re probably just using “disk databases”, not PostgreSQL databases:
Is this what you see? Move along, move along; this isn’t the ‘droid you’re looking for. But if you have database(s) listed under the PostgreSQL heading, keep reading!]
There’s nothing magical about it, aside from the fact that Seth has actually written the darned thing. It sets up periodic database dumps (backups) to a directory of your choice, and runs two important PostgreSQL tools: reindexdb and vacuumdb. These clear out deleted data, analyze current data, and rebuild indices that keep the database—which contains all the information about your files, projects, and grades—as fast and uncrufty as possible.
As the PostgreSQL db architect for a proxy media system in a previous life, I can affirm that doing this sort of maintenance is a Very Good Thing Indeed. I’ve looked through the code and it all looks kosher, but I don’t have any PostgreSQL 9.5 databases to test it with. Proceed at your own risk.
If you’re running Resolve on Linux, or on Windows with the Linux Subsystem, Seth’s script is a good starting point. You’ll have to replace launchd with whatever services-management framework your distro uses, but Seth’s well-formatted, clearly-commented code is easy to understand and to modify as needed. Proceed at your own risk.
If you’re on MacOS 10.13, you may need to edit things, too; I don’t know if 10.13 changes launchd invocations or plist formats. Proceed at your own risk.
The script and associated documentation is on GitHub. Proceed at your own risk.
Disclosure / disclaimer: Seth’s script is provided under the MIT License, which states, in part:
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Proceed at your own risk!