Harbor: database backup

Created on 17 Aug 2018  Â·  8Comments  Â·  Source: goharbor/harbor

Raising this issue to track feedback from Matt Cowger on Slack.

We need to support some mechanism by which a user can back up their Harbor node(s). A few possibilities I can think of on a whim:

  • Document the process of dumping the SQL DB via the CLI, including prerequisites to do this without issue (e.g., locking tables or stopping PostgreSQL, etc.)
  • cron-like job that would dump the DB contents into a specified location–likely the same storage used for images?–on a programmable basis so that users can feel confident there's a critical disaster recovery option on-hand
  • A UI element (pinging @lweitzman) that would allow an end-user to download _and restore_ a backup via the web interface

Important to note that backing up is useless if we don't provide a mechanism by which a user can restore the backup.

backlog kinrequirement

Most helpful comment

This is indeed a useful feature. A regular snapshot is helpful.

All 8 comments

This is indeed a useful feature. A regular snapshot is helpful.

Agreed for us, this is a blocker for using Harbor in production.

@lweitzman – thoughts on how you think this might look?

@cd1989 by snapshot, do you mean a snapshot to another DB instance or storage?
I personally don't think we can expose a backup feature in the OSS bits of Harbor, as this is quite deployment dependent.

So probably just a click to export SQL scripts, but do you think that'll be useful for the users?

@reasonerjt I basically agree with you. My origin opinion is, Harbor can provide a config for snapshot in the deployment of harbor. Then harbor can generate a snapshot of the whole database (SQL scripts for example) regularly. After a second though, it seems not necessary and too heavy.

So probably just a click to export SQL scripts, but do you think that'll be useful for the users?
I think it's useful. So that user can snapshot the database easily, and also if necessary, user can create some cron task to regularly snapshot the database to some external storage

I would love this feature plus the possibility to upload that backup to somewhere else as disaster recovery measure. Even API access to backup features would be fine as we can control that from ansible or so for instance.

👍

+1

+1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

reasonerjt picture reasonerjt  Â·  3Comments

Poil picture Poil  Â·  3Comments

reasonerjt picture reasonerjt  Â·  3Comments

levchik picture levchik  Â·  4Comments

cedvan picture cedvan  Â·  3Comments