Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up automated backups for brainard-archiva server #22

Closed
benjamin-heasly opened this issue Dec 1, 2015 · 5 comments
Closed

Set up automated backups for brainard-archiva server #22

benjamin-heasly opened this issue Dec 1, 2015 · 5 comments
Assignees

Comments

@benjamin-heasly
Copy link
Contributor

Our brainard-archiva server is hosted at AWS. It uses an EBS volume to store artifact data.

We should set up automated nightly backups of the EBS volume. These should be stored as EBS "snapshots" stored on S3.

Making EBS snapshots is really easy from the AWS management console. Automating the snapshots will take a bit more system admin work. Here is one possible approach.

@benjamin-heasly
Copy link
Contributor Author

I followed this README from CaseyLabs. I modified the script provided to retain snapshots for 31 days instead of 7 days.

I also used this handy review of crontab.

I created a new AMI called brainard-archiva plus backups to reflect the state of the server with AWS command line configuration and crontab configured.

@benjamin-heasly
Copy link
Contributor Author

The backup script works when invoked manually. For example:

# ssh to brainard-archiva
sudo /opt/aws/ebs-snapshot.sh

produced two a new snapshot of the brainard-archiva EBS volume, visible in the EC2 management console.

Will leave this issue open until I can confirm that the cron job works. This should be apparent at 22:55 GMT, which is when the backup is scheduled.

@benjamin-heasly benjamin-heasly self-assigned this Dec 1, 2015
@benjamin-heasly
Copy link
Contributor Author

Job did not fire last night. Looking at cron configuration, I think I scheduled the job as the wrong user, probably causing a permissions issue for AWS.

Re-scheduled the job as root, which has the AWS credentials.

@benjamin-heasly
Copy link
Contributor Author

Cron job was screwed up with an extra parameter root between the cron expression and the command string. Removed the word root and now the job fires and produces snapshots.

Will leave this issue open until 22:55 GMT to verify that the job id firing on the correct schedule.

@benjamin-heasly
Copy link
Contributor Author

Jobs are firing on the correct schedule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant