Nova Resource:Wikilabels/Backups

From Wikitech
Jump to navigation Jump to search

Current backup builder

See http://wikilabels-dumps.wmflabs.org/psql_dumps/ for the backups. The node is wikilabels-backups.eqiad.wmflabs

Set up a backup builder

This is the manual to setup a backup builder node:

  • Set up a node
  • Install postgresql client and apache
sudo apt-get install apache2 postgresql-client
  • Set up daily cronjobs:
09 09 * * * PGPASSWORD=<put the secret password here> pg_dump -h 10.64.37.8 --user u_wikilabels u_wikilabels -Z 9 -Fc > /var/www/html/psql_dumps/psql-$(date +\%F).dump
19 09 * * * rm /var/www/html/psql_dumps/psql-$(date -d "-7 days" +\%F).dump

The first job connects to the wikilabels database (10.64.37.8) and dump it, the second one deletes the old dumps.

  • Set apache default port to 8080 (Edit /etc/apache2/ports.conf and change Listen 80 to Listen 8080) and change the DNS proxy to point to this node and port 8080