Opened 3 weeks ago

Closed 3 weeks ago

#26 closed defect (fixed)

Make sure that the Trac database is backed up daily

Reported by: Fred Leeflang Owned by: Fred Leeflang
Priority: major Milestone: Everybody Using Trac
Component: System Administration Version:
Keywords: Cc:
Blocked By: Blocking:
Estimated Hours: 0 Parent Tickets:
Total Hours: 0.12

Description

If our goal is to let everybody use Trac to log any work, we should at the very least make sure that the database for it is being backed up frequently, both online and offline.

Subtickets

Change History (4)

comment:1 Changed 3 weeks ago by Fred Leeflang

Status: assignedaccepted

Automatically accepting in order to start work.

comment:2 Changed 3 weeks ago by Fred Leeflang

Trac's database (I suspect this one file holds EVERYTHING) sits in apache:/var/www/prd/trac.3dn.nl/db/trac.db:

root@apache:/var/www/prd/trac.3dn.nl/db# ls -l trac.db
-rw-r--r-- 1 www-data www-data 1101824 May 2 04:53 trac.db

The /var/www folder is already being backed up on gamma:

root@gamma:~# grep www /etc/cron.daily/backup
rsync --force -avz /var/www /backups/$H/websites >> /tmp/backuplog

A quick check verifies this is indeed the case:

root@gamma:~# ls -l /backups/gamma/websites/www/prd/trac.3dn.nl/db/trac.db
-rw-rw-r-- 1 libvirt-qemu kvm 1089536 May 1 12:29 /backups/gamma/websites/www/prd/trac.3dn.nl/db/trac.db

/var/www and /backups sit on two separate physical disks so if one disk would fail, we still have the backup on the other, so this backup is adequately covered this way. Trac also makes its own temporary backups:

root@apache:/var/www/prd/trac.3dn.nl/db# ls -l sqlite.41.152*
-rw-r--r-- 1 root www-data 815104 Apr 23 22:05 sqlite.41.1524513923.bak
-rw-r--r-- 1 root www-data 1003520 Apr 30 13:03 sqlite.41.1525086233.bak
-rw-r--r-- 1 root www-data 1040384 Apr 30 13:53 sqlite.41.1525089232.bak
-rw-r--r-- 1 root www-data 1064960 Apr 30 21:37 sqlite.41.1525117059.bak

I expect that it makes these on sensible intervals

comment:3 Changed 3 weeks ago by Fred Leeflang

fredl worked on this ticket for 0.13 between 05/02/18 04:53:18 and 05/02/18 05:00:39.

done.

comment:4 Changed 3 weeks ago by Fred Leeflang

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.