Skip to main content

Backup Issue using DRBD

Posted by ryan.tuttle on Thu, 09/24/2009

I just found an interesting issue when doing a backup on my DRBD/HA MTE server. The asterisk directory in the tar file is just the alias to the DRBD disk, not the actual asterisk directory which is located on my DRBD volume. I'm using 6.0.1.72 and I'm hoping that this might be fixed in 6.0.1.75. I've started backing up the asterisk directory separately vi a shell script but I'm hoping that this can be fixed soon.

Thank you


Submitted by eeman on Thu, 09/24/2009 Permalink

I just retrieved a pbxmanager backup file and confirmed that all my symbolic linked directories were backing up in their entirety except for /etc/asterisk.

my drbdlinks includes items such as

mountpoint('/hadata')

link('/etc/asterisk')

link('/var/lib/asterisk')

link('/var/spool/asterisk')

which happen to co-inside with the paths the backup script executes.. I think if you

tar -czvf backupfile.tar.gz /var/lib/asterisk/moh you get the contents

if you

tar -czvf backupfile.tar.gz /var/lib/asterisk you get a symbolic link called asterisk

this is not easily programmed around since in most cases you do want to preserve the symbolic links. and therefore a (-h) option is not ideal, especially considering only 1/10 of 1% of those using pbxmanager are doing a DRBD solution. FWIW the backup script is far from complete, you should also consider using the backup tool in webmin to backup all the webmin users, other configs (vsftpd etc) along with your provisioned phone configs etc. Here you can also add the /hadata/etc/asterisk contents (or whatever relative drbd partition). Using 3 backups (pbxmanager, webmin, and the sql dumps of each database) you can have a backup of everything you need to restore everything from base installation

Submitted by ryan.tuttle on Thu, 09/24/2009 Permalink

Makes perfect sense, I just started doing that since I discovered this but mainly I wanted everyone else to be aware of this. It would be terrible to find out after your systems fail that your backup was incomplete.

As for updating the pbxmanager script the one thing I thought could be done is to have the script check the folders that are being backed up. If one is a link then add the (-h) option in when backing up that directory.