User:Alvaro Ortiz-Troncoso/Moved backups to /mnt/backup

From Biowikifarm Metawiki
Jump to: navigation, search

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:


The following scripts are unchanged, as they take their paths from


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

alternative: copy just the directory structure

sudo find -type d -links 2 -exec mkdir -p "/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


backup moved to /mnt/backup
REVERTED as /mnt/backup was re-mounted read-only due to errors
Ran badblocks command. Did not find errors.
sudo badblocks -v /dev/xvdf > /home/alvaro/badblocks
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
REVERTED as /mnt/backup was re-mounted read-only due to errors
After checking with the system administrator of MfN, remounted /mnt/backup. /var/backups now points to /mnt/backup
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 the system administrator of MfN could not 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.
NEW TEST. I will try to run the backups to the new partition during the weekend. The partition is now correctly mounted as read-write. If the backups fail again, I will definitely stop trying.
Test failed. Reverted.
Works since the network was reconfigured by WF.