kartoza / docker-pg-backup

A cron job that will back up databases running in a docker postgres container
GNU General Public License v2.0
452 stars 103 forks source link

Hanoi Backup Scheme and Remote Backup Service #3

Closed lucernae closed 7 years ago

lucernae commented 9 years ago

Don't merge it yet. Hanoi Backup Scheme and Remote Backup Service via SFTP are already tested on local.

Test it on production environment first before merging it

To Do :

timlinux commented 9 years ago

Nice to see this coming on. Though I wonder if it would be better to make a dedicated docker project for it. The docker image would just take a directory to be backed up (which could be a volume from host of from linked container) and then do the SFTP hanoi stuff.

As a general design principle we want to construct our architectures from micro services - as soon as things start becoming monolithic and complex it should be a red flag that we are taking a wrong turn!

lucernae commented 9 years ago

I think I misunderstood that at first. I thought we're gonna extend this service functionality. So we're not gonna do Hanoi local backup but only SFTP Hanoi? If we're making this as another services, then CMIIW this is the scenario I can think up:

  1. tar/archive the target folder
  2. rename the archived folder and tag it with time information (like this backup filename)
  3. send it via SFTP and apply Hanoi sync to remote server (cleanup unneeded backup and push new backups)

I think it is still easy to change some Hanoi logic will still be the same, the one I need to change would be the pg_dump command is replaced by archiving the folder.

timlinux commented 9 years ago

Hi @lucernae

I'd like to use it in some other use cases:

I still do see a use in having local file system backups in e.g. `/var/backups`` (or whoever the user nominates) and then also having the option to synchronise that backup store to sftp (or in future amazon S3 etc.) Again in the micro services architecture we could also run a docker btsync container against the local file store.

lucernae commented 7 years ago

We should close this. Hanoi scheme is separated on http://github.com/kartoza/docker-sftp-backup for micro service architecture.