k0lter / autopostgresqlbackup

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

Support multiple hosts #21

Closed naoliv closed 2 months ago

naoliv commented 1 year ago

Would it be possible to add support for multiple hosts, please?

For example, we could have the hosts separated by commas (or another separator) and, for each host, run the same backup process.

# Host names (or IP addresses) of PostgreSQL servers e.g localhost
DBHOST=server1, server2, server3
k0lter commented 1 year ago

I understand your need but I will have another approach.

There will probably be a /etc/autopostgresqlbackup.d/ directory containing config files like /etc/default/autopostgresqlbackup (renamed /etc/autopostgresqlbackup.d/default.conf).

Then it could be possible to add other configuration files in this directory to be automatically processed.

ieugen commented 1 year ago

Looking forward to having this feature. I think I can have a workaround for this IMO. I'm planning to run the script from docker and would be able to provide configuration as a volume mount.

Updated: This will only work if I have a cron outside Docker and use one docker container / db host (backup configuration).

Supporting multiple configurations is IMO much better approach since there can be only one container for all dbs.

k0lter commented 4 months ago

@naoliv @ieugen It's been implemented in the last commits, see (documentation, the -c argument and the (examples directory.

k0lter commented 2 months ago

@naoliv @ieugen I'm closing this issue as I think that it's now fixed. Don't hesitate to reopen it if you think it deserves it.