A collection of scripts, configuration and information regarding what's currently being backed up.
- ci.nodejs.org:
- full backup of /var/lib/jenkins (rotated, excluding workdirs)
- iptables rules (rotated)
- ci-release.nodejs.org:
- full backup of /var/lib/jenkins (rotated, excluding workdirs)
- iptables rules (rotated)
- iojs-softlayer-benchmark: mysql dump (rotated)
- nodejs-www:
- /home/dist/iojs: all artifacts for iojs.org (static, no deletion)
- /home/dist/nodejs: all artifacts for nodejs.org (static, no deletion)
- /home/libuv/www/dist: all artifacts for libuv.org (static, no deletion)
- /var/log/nginx: all logs for nodejs, iojs and libuv (rotated)
A list of the backup folder structure to make it easier navigating around.
filename | description |
---|---|
archive/ |
archived content |
archive/nodejs-logs |
contains compressed logfiles from the old nodejs server |
archive/old-jenkins.tar.xz |
a full copy of jenkins pre-security-vulnerability |
static/ |
backed up content intended for non-rotation |
periodic/ |
periodically updated storage managed by rsnapshot |
Dependencies:
- rsync 3.x (or newer)
- rsnapshot 1.2 (or newer)
Note: You will likely want ~1Tb storage available on /backup.
- Install dependencies
- Copy the folder
backup_scripts
to /root/ - Place rsnapshot.conf somewhere (and possibly change paths below)
- Create the folder
/backup
(or edit configs to use another path) - Add scripts to cron:
50 23 * * * /opt/local/bin/rsnapshot -c /opt/local/etc/rsnapshot.conf daily && /root/backup_scripts/remove_old.sh ci-release.nodejs.org && /root/backup_scripts/remove_old.sh ci.nodejs.org 40 23 * * 6 /opt/local/bin/rsnapshot -c /opt/local/etc/rsnapshot.conf weekly 30 23 1 * * /opt/local/bin/rsnapshot -c /opt/local/etc/rsnapshot.conf monthly
- Edit your ssh config as needed (likely the benchmark host)
- Place the backup key retrieved from the secrets repo in
/root/.ssh/nodejs_build_backup
- Add your jenkins credentials to /root/.jenkins_credentials (so we can reload jenkins after updating the folder structure)