k0lter / autopostgresqlbackup

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

Feature request in v2: Make the path to the config file configurable #17

Closed hyperman2 closed 2 months ago

hyperman2 commented 1 year ago

The config file is today hardcoded to /etc/default/autopostgresqlbackup

If I could provide a config file on the command file, I could schedule multiple instances of autopostgresqlbackup in cron, backing up different postgres clusters from the same machine.

Workaround: The config file is a script file, so it can switch between configs based on an environment variable.

hyperman2 commented 1 year ago

I just logged 6 bugs/feature requests. If I ever meet @k0lter in real life, I should buy you cookies. Thanks for this script!

k0lter commented 1 year ago

That's planned. The middle term plan is to rename this tool autodbbackup and the v2 rewrite will permit to easily backup others databases engines like MySQL, Mongo, Influx, etc.

There will probably be a /etc/autobackup.d/ directory with config files like /etc/default/autopostgresqlbackup with default configuration for supported databases engines but also to add your own.

As an example:

ieugen commented 1 year ago

I like the plan, but are you sure you want to build a generic db backup tool in bash?

IMO it's not the best language to write complex software in. Maintenance is quite hard IMO.

To be honest, I've already asked myself if I should continue with bash, but bash is very portable and widely installed on Unix like systems. The complex part is still done by the database cli tools, this script is just a handy wrapper around them.

ieugen commented 1 year ago

I believe this relates to: https://github.com/k0lter/autopostgresqlbackup/issues/21

k0lter commented 2 months ago

@hyperman2 @ieugen I'm closing this issue as it was fixed a few weeks ago (see 81614646bc654c508770f3108891d1e348ac9b59).

Hansyperman commented 2 months ago

Thanks