Difference between revisions of "User:Alvaro Ortiz-Troncoso/Moved backups to /mnt/backup"

From Biowikifarm Metawiki
Jump to: navigation, search
(Log)
Line 56: Line 56:
 
;01.10.2015
 
;01.10.2015
 
:After checking with Wolfram Fritsch, remounted /mnt/backup. /var/backups now points to /mnt/backup
 
:After checking with Wolfram Fritsch, remounted /mnt/backup. /var/backups now points to /mnt/backup
 +
 +
;09.10.2015
 +
:REVERTED. All changes have been reverted, as there are problems with the integration of the backup partition and Xen. As I have no access to the virtual machine's hypervisor and Wolfram Fritsch has not been able to solve the problem, I have reverted all the changes to the previous situation. So Backups are being made, but they are on the same machine as the operating system.

Revision as of 08:50, 13 October 2015

REVERTED

Changes below have been reverted on 09.10.2015, as there were problems with Xen.

DONE

Backups can now be saved to a backup drive. The drive in mounted on /mnt/backup. Previously, backups were saved to /mnt/dump/var/backups. Note: /var/backups is a link to /mnt/dump/var/backups.

Backup of /etc/backupscripts/ in /etc/backupscripts.20150911

Set DBBAKDIR_ROOT="/mnt/backup" in these scripts in /etc/backupscripts:

  • daily_bak_entry.sh
  • daily_bak_master.sh

The following scripts are unchanged, as they take their paths from daily_bak_master.sh:

  • daily_bak_mysql.sh
  • daily_bak_svn.sh
  • daily_bak_settings.sh
  • daily_bak_wiki_media.sh

Copied everything from /mnt/dump/var/backups into /mnt/backup, keeping owners, permissions and timestamps

sudo cp -rp /mnt/dump/var/backups/DAILY /mnt/backup
sudo cp -rp /mnt/dump/var/backups/WEEKLY /mnt/backup
sudo cp -rp /mnt/dump/var/backups/MONTHLY /mnt/backup
sudo cp -p /mnt/dump/var/backups/* /mnt/backup

/var/backups now points to /mnt/backup, as the scripts which create apt-, dpkg-, passwd-, group-, gshadow- and shadow-backups have hard coded the path to /var/backups.

Cron has to be restarted to reload files which are not in /etc/cron.d

sudo service cron restart

To Do

The old backup files can now be found in /var/backups_old.

Log

13.09.2015
backup moved to /mnt/backup
14.09.2015
REVERTED as /mnt/backup was re-mounted read-only due to errors
15.09.2015
Ran badblocks command. Did not find errors.
sudo badblocks -v /dev/xvdf > /home/alvaro/badblocks
16.09.2015
Remounted /mnt/backup. /var/backups now points to /mnt/backup
sudo umount /mnt/backup
sudo mount -t ext4 -o remount,rw /dev/xvdf /mnt/backup
17.09.2015
REVERTED as /mnt/backup was re-mounted read-only due to errors
01.10.2015
After checking with Wolfram Fritsch, remounted /mnt/backup. /var/backups now points to /mnt/backup
09.10.2015
REVERTED. All changes have been reverted, as there are problems with the integration of the backup partition and Xen. As I have no access to the virtual machine's hypervisor and Wolfram Fritsch has not been able to solve the problem, I have reverted all the changes to the previous situation. So Backups are being made, but they are on the same machine as the operating system.