Closed Bug 1689640 Opened 5 years ago Closed 5 years ago

new hgweb mirror to act as an offsite backup

Categories

(Developer Services :: Mercurial: hg.mozilla.org, task)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheehan, Assigned: sheehan)

Details

(Keywords: leave-open)

Attachments

(4 external files)

Our point-in-time restore backups in MDC1 are broken due to performance constraints around backing up all the repository data. To keep a backup of the system without having to keep such a large amount of data, we're going to stand up an hgweb mirror in AWS that is essentially a copy of the hgweb nodes in MDC1, containing all repo data. This will allow us to drop the repo data from our CrashPlan backups and keep point-in-time restore in case something goes horribly wrong.

As gcox pointed out, we should make sure this backup node won't have it's data deleted by an accidentally executed delete command (ie we need to special-case this backup node in hg replicatedelete).

Adds a new variable backup_node to the aws-vpc module which creates a
backup node in the VPC when set. This backup node is the same as the
other hgweb mirrors in the VPC (has access to MDC1 via the corporate
VPN) except it has much more disk space and is not connected to the
load balancer through which CI sends it's VCS queries. This will allow
the node to replicate all changes made to repos in MDC1 and have the
replicated repos be restorable via bundling/cloning from the backup
node.

Sets the new backup_node value to 1 for the us-west-2 instantiation
of the aws-vpc module.

Depends on D103912

Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/6ce40b5ee986
terraform: add a new hgweb backup node r=mhentges

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Keywords: leave-open
Resolution: FIXED → ---

I was wondering if there's any updates here regarding completion of the off site mirror. If this has been completed, then I'd like to stop backing this up from the IT side.

Thanks!

(In reply to Rob Tucker [:rtucker] from comment #4)

I was wondering if there's any updates here regarding completion of the off site mirror. If this has been completed, then I'd like to stop backing this up from the IT side.

Thanks!

I've got the instance set up and many of the repos are being backed up onto it. There were a few repos that failed to clone so I'm going to run an audit and ensure everything is fully backed up before EOW. I also have some patches being tested for ensuring repos on the mirrors aren't accidentally deleted by the replication system.

Since the full backups don't work at this point anyways, you can go ahead and remove all the repos from the them so we're only backing up the OS, for point-in-time restore. Thanks!

There really isn't a full os backup for full restore in this case.
We have multiple nodes that serve the repos though.
hgssh1.dmz.mdc1.mozilla.com
hgssh2.dmz.mdc1.mozilla.com
hgssh3.dmz.mdc1.mozilla.com
hgssh6.dmz.mdc1.mozilla.com

The nodes above are built out via configuration management, and I do not believe there is anything else that needs to be backed up on them.
The repos themselves are have 2 days (I believe) of snapshots on the NetApp filers.
We backup the logs to a centralized server as well.

If we should look to backup certain directories on them, please let me know.

A few minor changes needed to make the bootstrap playbook
more usable.

Also add a deploy-backup.yml Playbook that deploys the
hg-web role with various parameters specific to backup nodes.

Depends on D104833

Adds an is_backup function to vcsreplicator's config object
which checks the config for the presence of the consumer.backup
option. If this function returns True when processing a repo
delete message, it is ignored on the node.

Add this config option to the backup nodes so repos aren't accidentally
deleted.

Depends on D104834

Pushed by cosheehan@mozilla.com: https://hg.mozilla.org/hgcustom/version-control-tools/rev/2a110aebca26 ansible: fix bootstrap playbook r=mhentges https://hg.mozilla.org/hgcustom/version-control-tools/rev/3356544e64d6 ansible: add new backup node to hosts file r=mhentges https://hg.mozilla.org/hgcustom/version-control-tools/rev/bbe3d18d911a vcsreplicator: avoid processing `hg-repo-delete-1` message if vcsrepicator "backup" config set r=mhentges
Pushed by cosheehan@mozilla.com: https://hg.mozilla.org/hgcustom/version-control-tools/rev/3fb7864fa2cf ansible: add hgweb-backup nodes to twig reset playbook
Status: REOPENED → RESOLVED
Closed: 5 years ago → 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: