Is backing up git direcotry enough and can be considred NoteDb backup?

174 views
Skip to first unread message

Abbas Yazdanpanah

unread,
Jun 13, 2018, 3:14:48 AM6/13/18
to Repo and Gerrit Discussion
Hi,

First of all, our team members are much happier using Gerrit.

We have a small Gerrit(2.15.2) installation and we already have migrated to NoteDB. What confuses me is ASFAIK backing up just git directory is enough but sometimes I doubt it. Is it really enough

If it is enough can we schedule backups using replication plugin? Which refs should specified?

Thanks,
Abbas.

Matthew Webber

unread,
Jun 13, 2018, 3:34:57 AM6/13/18
to Repo and Gerrit Discussion
We have a small Gerrit(2.15.2) installation and we already have migrated to NoteDB. What confuses me is ASFAIK backing up just git directory is enough but sometimes I doubt it. Is it really enough
If it is enough can we schedule backups using replication plugin? Which refs should specified?

In 2.15, there is still some data held in the SQL database (not everything has migrated to NoteDB)., so you need to back that up as well.
We backup the entire $site_path (not just $site_path/git) and the SQL database (actually, we use a NetApp and snapshots, but that's the principle).

The only way to know for sure that you have backed up what you need is to pretend that you have lost your Gerrit install, and test doing a restore.

You need to work out, BEFORE you have a disk failure, how you will recover, and then WRITE DOWN and TEST that process (this applies to all backups, not just Gerrit!).

Edwin Kempin

unread,
Jun 13, 2018, 3:37:43 AM6/13/18
to yazdan...@gmail.com, Repo and Gerrit Discussion
On Wed, Jun 13, 2018 at 9:14 AM Abbas Yazdanpanah <yazdan...@gmail.com> wrote:
Hi,

First of all, our team members are much happier using Gerrit.

We have a small Gerrit(2.15.2) installation and we already have migrated to NoteDB. What confuses me is ASFAIK backing up just git directory is enough but sometimes I doubt it. Is it really enough
If you have fully migrated to NoteDb (including changes) all Gerrit meta data is stored in the git repositories.
See point 'consistency' in [1] which mentions backups.

In addition to the git directory I would also backup the other folders of the gerrit site dir, so that you also have a backup of your gerrit configuration, installed plugins etc.

 

If it is enough can we schedule backups using replication plugin? Which refs should specified?
For backup purposes I would not solely rely on the replication plugin, e.g. if a ref gets deleted and this ref deletion gets replicated, you don't have a backup from where you could restore that ref. So in addition to using the replication plugin I would always make backups on filesystem level too.

You must make sure to include all refs into the backup.
[2] and [3] list the refs that are needed for accounts and groups.
I think we are missing such a list for changes.


 

Thanks,
Abbas.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Abbas Yazdanpanah

unread,
Jun 14, 2018, 5:02:15 AM6/14/18
to Repo and Gerrit Discussion
Thanks for your help.

I'll surely test the backups before anything goes wrong, and I try to make things redundant.

Again thanks for your help.

Abbas Yazdanpanah

unread,
Jun 14, 2018, 5:05:02 AM6/14/18
to Repo and Gerrit Discussion
Thanks for your help.


On Wednesday, June 13, 2018 at 12:07:43 PM UTC+4:30, Edwin Kempin wrote:


On Wed, Jun 13, 2018 at 9:14 AM Abbas Yazdanpanah <yazdan...@gmail.com> wrote:
Hi,

First of all, our team members are much happier using Gerrit.

We have a small Gerrit(2.15.2) installation and we already have migrated to NoteDB. What confuses me is ASFAIK backing up just git directory is enough but sometimes I doubt it. Is it really enough
If you have fully migrated to NoteDb (including changes) all Gerrit meta data is stored in the git repositories.
See point 'consistency' in [1] which mentions backups.

In addition to the git directory I would also backup the other folders of the gerrit site dir, so that you also have a backup of your gerrit configuration, installed plugins etc.

 

If it is enough can we schedule backups using replication plugin? Which refs should specified?
For backup purposes I would not solely rely on the replication plugin, e.g. if a ref gets deleted and this ref deletion gets replicated, you don't have a backup from where you could restore that ref. So in addition to using the replication plugin I would always make backups on filesystem level too.
I'll backup all $site_path files.

You must make sure to include all refs into the backup.
[2] and [3] list the refs that are needed for accounts and groups.
I think we are missing such a list for changes.
It seems that if we could aggregate all related information in single document  it would be great. I would be more than happy to help this happen.

Edwin Kempin

unread,
Jun 14, 2018, 5:12:54 AM6/14/18
to Abbas Yazdanpanah, Repo and Gerrit Discussion
On Thu, Jun 14, 2018 at 11:05 AM Abbas Yazdanpanah <yazdan...@gmail.com> wrote:
Thanks for your help.

On Wednesday, June 13, 2018 at 12:07:43 PM UTC+4:30, Edwin Kempin wrote:


On Wed, Jun 13, 2018 at 9:14 AM Abbas Yazdanpanah <yazdan...@gmail.com> wrote:
Hi,

First of all, our team members are much happier using Gerrit.

We have a small Gerrit(2.15.2) installation and we already have migrated to NoteDB. What confuses me is ASFAIK backing up just git directory is enough but sometimes I doubt it. Is it really enough
If you have fully migrated to NoteDb (including changes) all Gerrit meta data is stored in the git repositories.
See point 'consistency' in [1] which mentions backups.

In addition to the git directory I would also backup the other folders of the gerrit site dir, so that you also have a backup of your gerrit configuration, installed plugins etc.

 

If it is enough can we schedule backups using replication plugin? Which refs should specified?
For backup purposes I would not solely rely on the replication plugin, e.g. if a ref gets deleted and this ref deletion gets replicated, you don't have a backup from where you could restore that ref. So in addition to using the replication plugin I would always make backups on filesystem level too.
I'll backup all $site_path files.

You must make sure to include all refs into the backup.
[2] and [3] list the refs that are needed for accounts and groups.
I think we are missing such a list for changes.
It seems that if we could aggregate all related information in single document  it would be great. I would be more than happy to help this happen.
Sounds like a good idea. Thanks, would be great if you could contribute to that.

Abbas Yazdanpanah

unread,
Jun 16, 2018, 4:43:13 PM6/16/18
to Repo and Gerrit Discussion
As far as I've investigated, needed information are scattered along different documents. I'm sending the list of all pages with relevant information as a reference here.

What I'm suggesting is to have an special document about `refs` all in one document and also update replication plugin documents referring to this new document about what must be done about each ref type.

I'll start to work on this in following weak and will submit a patch.
Reply all
Reply to author
Forward
0 new messages