autopostgresqlbackup icon indicating copy to clipboard operation
autopostgresqlbackup copied to clipboard

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

Open hyperman2 opened this issue 2 years ago • 4 comments

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 avatar Feb 02 '23 10:02 hyperman2

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

hyperman2 avatar Feb 02 '23 10:02 hyperman2

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:

  • /etc/default/autopostgresqlbackup could become /etc/autobackup.d/postgresql.conf
  • I could add /etc/autobackup.d/{mysql,mongdb}.conf the same way
  • It could be possible if you have a Pg Cluster to duplicate (multiple times if needed) /etc/autobackup.d/postgresql.conf and ajust settings

k0lter avatar Feb 03 '23 08:02 k0lter

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 avatar Aug 02 '23 11:08 ieugen

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

ieugen avatar Aug 02 '23 12:08 ieugen

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

k0lter avatar Jun 15 '24 21:06 k0lter

Thanks

Hansyperman avatar Jun 17 '24 06:06 Hansyperman