Page MenuHomePhabricator

Re-establish Wikilink backups and set up a retention schedule
Closed, ResolvedPublic

Description

On the production Wikilink server we set up weekly database backups. These were done via a simple script which was never added to the repository:

#!/bin/bash

now="$(date +'%d%m%Y')"

mysqldump -h"127.0.0.1" -u"root" -p"[password]" extlinks_db > /home/samwalton9/db_backup/${now}_backup.sql

/home/samwalton9/db_backup/ was a bad location to put these, and we had no retention schedule so the instance kept filling its disk space.

We should implement a better weekly backup system, and delete old backups after 3 months.

Acceptance criteria

  • Each week a database backup should be taken
  • Backups should be deleted 3 months after their creation

Event Timeline

Samwalton9-WMF moved this task from Incoming to Features on the Wikilink-Tool board.
Samwalton9-WMF renamed this task from Delete old Wikilink backups to Delete old Wikilink backups on a regular basis.Jul 8 2020, 10:35 AM
Samwalton9-WMF updated the task description. (Show Details)
Samwalton9-WMF renamed this task from Delete old Wikilink backups on a regular basis to Re-establish Wikilink backups and set up a retention schedule.Aug 21 2020, 9:30 AM
Samwalton9-WMF updated the task description. (Show Details)
jsn.sherman moved this task from Ready to In Progress on the The-Wikipedia-Library (Kanban) board.

I still need to make sure the script fails out if it can't perform the db dump. When I know that's true, I can add the deletion of old backups as a simple && in the script.