Transplanting database backup stuff from Mirage