Skip to content

Instantly share code, notes, and snippets.

@admalledd
Last active January 2, 2016 18:59
Show Gist options
  • Save admalledd/8347260 to your computer and use it in GitHub Desktop.
Save admalledd/8347260 to your computer and use it in GitHub Desktop.
server move checklist/info

List of things to help me remember what I am doing while re-installing the server. I will also use this to post details about the update procedure. Those details will be in a separate file called "status.md" and will only be created once the process has started.

**TODO list in order: **

  1. download all data (see next two lists)
  2. reinstall OS with 64bit and GRsec disabled (attempt deb-bootstrap, see here, see note on deb-bootstrap at end of file)
  3. if deb-bootstrap succeeds ignore the data restore steps, only copy configurations and non-home'd data
  4. first step of new OS: set up remote high speed access (sftp/ssh/pubkeyauth)
    1. copy over old host keys
    2. set up ssh on port 443 as well
    3. create new user
      1. copy over .ssh folder of old user on old server
      2. add new user to adm/sudoers
      3. copy over .profile/.bashrc/.bash_history
    4. restart ssh (and bite nails...)
    5. start copying the deltas over on upload PC (takes long time, start early)
      1. NOTE: if uploading the whole deltas is too much, prune to last 14 days and upload those
  5. install LAMP (apache/php/mysql/phpmyadmin ect ect)
  6. restore the DB backup(s)
  7. publish the website files again
    1. placeholder for www.admalledd.com/mc/map/index.html (about how the map was lost and has to re-render... later)
    2. www symbolic links
      1. /var/www/dl -> /home/admalledd/www/dl/
      2. /var/www/favicon.ico -> /home/admalledd/www/favicon.ico
      3. /var/www/mc -> /home/admalledd/www/mc/
      4. /var/www/php -> /home/admalledd/www/php
    3. /var/www/.htaccess
  8. shut down apache, copy phpmyadmin configs over
    1. /etc/phpmyadmin/*
    2. /etc/dbconfig-common/phpmyadmin.conf
    3. /usr/share/phpmyadmin/.htaccess
    4. check that phpmyadmin reports that all DB's have been restored
    5. check that the forum reports all posts are alive...
  9. install murmur, restore the murmur DB and key files
  10. copy over cchelper, start up cchelper.py
  11. make sure sb.admalledd.com server is first over, restart it
    1. /home/admalledd/starbound
  12. adv.admalledd.com next, start it up via mark2
    1. copy raw data (no auto backups!)
    2. /home/admalledd/minecraft/adventure
  13. mc.admalledd.com second to last, also start via mark2
    1. extract from deltas using rdiff-backup
    2. /home/admalledd/cur
    3. /home/admalledd/backup
    4. change backups to point to /home/admalledd/minecraft/backups/mc.admalledd.com/
  14. mod.admalledd.com last, stat inside of tmux/screen/byobu (make sure to change restart.sh to reflect...)
    1. extract from deltas using rdiff-backup
    2. /home/admalledd/dnstech
    3. /home/admalledd/backup_dnstech
    4. change backups to point to /home/admalledd/minecraft/backups/mod.admalledd.com/
  15. change all */plugins/simplecronclone/sayadmin-y.scc's to remove the notice of the re-install
  16. die from exhaustion
  17. get resurrected in time for DND later.

DELTAS TO COPY (WARNING: LARGE!)

  • /home/admalledd/minecraft/backup (main server: mc.admalledd.com)
  • /home/admalledd/minecraft/backup_dnstech (dnstech: mod.admalledd.com)

DATA TO BACKUP THAT IS NOT PART OF THE DELTAS!!!

  • /home/admalledd/.ssh/*

  • /etc/ssh/*

  • /home/admalledd/(.profile|.bashrc|.bash_history)

  • /home/admalledd/.mark2rc.properties

  • /home/admalledd/.m2/*

  • /home/admalledd/www/*

  • /home/admalledd/minecraft/adventure/

  • /var/lib/mumble-server/*

  • /etc/phpmyadmin/*

  • /etc/dbconfig-common/phpmyadmin.conf

  • /usr/share/phpmyadmin/.htaccess

  • /home/admalledd/www/*

  • /var/www/.htaccess

DELTAS TO RSYNC AT LAST MINUTE

  • /home/admalledd/minecraft/backup
  • /home/admalledd/minecraft/backup_dnstech
  • /home/admalledd/minecraft/adventure
  • mysqldump -u$DB_ADMIN_USER -p$DB_ADMIN_PWD --all-databases|gzip

TODO LATER

Things that I have to put off for later after the re-install. mostly things that need either lots of CPU, RAM, or bandwidth

  • map render: this is put off due to it being over 200 gigs, the plan is that within 72 hours of the re-install I will start a from-scratch render will take about 3-12 days...

DEB-BOOTSTRAP

Thanks to some information found on the OVH forums and elsewhere it may be possible to re-install the OS without loosing everything under the /home/ partition. If this is the case then that means we only need to re-upload system-specific configurations (eg, usernames, passwords, installed software ect ect) This is experimental but gives me a chance to save about 5~ hours on the re-install waiting for data to be uploaded. Instructions above assume failure (considering I have never done a live re-install like this, better to plan for the worse.)

2014-01-11 01:28 debootstrap failed (cant bootstrap across bit boundary without lots of work, easier to reinstall from scratch)

reinstalled from scratch, beginning adding new users and such. next update will be when uploads of micro-deltas start

2014-01-11 00:30 debootstrap started debootstrap --arch amd64 wheezy /a http://mir1.ovh.net/ftp.debian.org/debian/

2014-01-10 23:55

netbooting into rescue mode for attempting deb-bootstrap reinstall

2014-01-10 22:12

started status.md file.

copying deltas from backup to temp target (I want double redundancy before I start, so backups and deltas are being moved to both standard location and the temporary upload machine)

uploading of delta files will be carried out via moving the "upload machine" to a local school and using their upload pipe (100 Mbit) that I have clearance for ~5 hours. Using rsync so that if need be I can stop the transfer part way and continue elsewhere.

three "stages" of deltas:

  1. micro/mini: these are the smallest possible to get the game servers running again. ~15 gigs
  2. small: 2 months history only, mysql deltas out to 6 months. ~50 gigs
  3. large: full deltas (probably wont use), 3 years, mysql out to 2.5 years (when we started logging). ~240 gigs

will upload the "mini" deltas first to get a guess at how long it would take to upload the others/larger ones.

of course this is only IF we loose the /home/ partition when I attempt to do the re-install. still waiting for double redundancy in the backups before I start. Again I will attempt a "live reinstall" as per the instructions here

updates will go at top of status.md file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment