TIPS FreePBX Backup and Restore errors?

Chris Smith

New Member
Joined
Nov 21, 2014
Messages
10
Reaction score
0
I have tried searching for other people with these problems but have not found anything with a resolution. The errors I am receiving seem to be related to permissions. The errors with access to /usr/local/sbin make sense to me...I don't know that Asterisk should be able to access those directories. It appears the directory is part of the Full Backup template.

The restore errors don't really make sense to me as Asterisk owns the /var/www/html directory and all subdirectories. This is from the same Full Backup backup created in the first section below. The restore does seem to function at least at a basic level...I updated some disabled modules after the backup and the restore put the modules back to their outdated versions.

This is a fresh installation:
PIAF Installed Version = 3.0.6.6 under *HARDWARE* x
x FreePBX Version = 2.10.1.19 x
x Running Asterisk Version = 11.16.0 x
x Asterisk Source Version = 11.16.0 x
x Dahdi Source Version = 2.10.0.1 x
x Libpri Source Version = 1.4.15 x
x IP Address = 192.168.148.50 on eth0 x
x Operating System = CentOS release 6.6 (Final) >< x
x Kernel Version = 2.6.32-504.16.2.el6.x86_64 - 64 Bit

Backup Log:


Code:
Saving Backup 2...done!
Intializing Backup 2
Backup Lock acquired!
Running pre-backup hooks...
Adding items...
/bin/tar: Removing leading `/' from member names
/bin/tar: /usr/local/sbin/uf121124stub: Cannot open: Permission denied
/bin/tar: /usr/local/sbin/uf100110stub: Cannot open: Permission denied
 
<<TRUNCATED DUE TO POST LIMIT SIZE>>
 
/bin/tar: /usr/local/sbin/gstub: Cannot open: Permission denied
/bin/tar: Exiting with failure status due to previous errors
/bin/tar: Removing leading `/' from member names
/bin/tar: Removing leading `/' from member names
/bin/tar: Removing leading `/' from member names
Bulding manifest...
Creating backup...
Storing backup...
Running post-backup hooks...
Backup successfully completed!


Restore Log:

Code:
FreePBX is a registered trademark of
Schmooze Com., Inc.
FreePBX 2.10.1.19 is licensed under the GPL
Copyright© 2013www.schmoozecom.com
Run restore
close
Intialized!!
Intializing Restore...
Running pre-restore hooks, if any...
Restoring files...
/bin/tar: ./var/www/html/var/www/html/index.php: Cannot open: File exists
/bin/tar: ./var/www/html/var/www/html/index.html: Cannot open: File exists
/bin/tar: ./var/www/html/var/lib/asterisk/bin/freepbx_engine: Cannot open: File exists
/bin/tar: ./var/www/html/index_custom.php: Cannot open: File exists
 
<<<TRUNCATED DUE TO POST LIMIT SIZE>>>
 
/bin/tar: ./usr/local/sbin/asthostid32: Cannot open: File exists
/bin/tar: Exiting with failure status due to previous errors
File restore complete!
Restoring CDR's...
Getting CDR size...
Processed 100% of CDR's!
Restoring CDR's complete
Restoring settings...
Getting Settings size...
Processed 100% of Settings'!
Restoring astDB...
Restoring Settings' complete
Running post-restore hooks, if any...
Cleaning up...
Restore complete!
Reloading...
Done!
 

RPi-Fan

Member
Joined
Jun 8, 2014
Messages
85
Reaction score
13
I ran into this over a year ago and was never able to get an explanation/solution either on this forum or the FreePBX forum. I finally came to the conclusion that the restore process is flawed in that it's trying to overwrite files (/var/www/html/*) that are in use by apache (they are the FreePBX GUI that's running Backup/Restore).

I abandoned the FreePBX backup/restore module and put together backup/restore scripts closely modeled after the incrediblebackup/incrediblerestore scripts contained in:

http://incrediblepbx.com/ubuntu-gui.tar.gz
 

jeff.h

Guru
Joined
Dec 1, 2010
Messages
502
Reaction score
71
I am not seeing those errors at all. I actually split my daily backups in two, one for CDRs and settings and one for moh and system audio.

These are from today's emailed reports.

Subject: Cron <asterisk@pbx> ID=freepbx_backup_1 /var/lib/asterisk/bin/backup.php --id=1
Date: May 29, 2015 at 12:00:01 AM CDT

Intializing Backup 1
Backup Lock acquired!
Running pre-backup hooks...
Adding items...
Bulding manifest...
Creating backup...
Storing backup...
Running post-backup hooks...
Backup successfully completed!


Subject: Cron <asterisk@pbx> ID=freepbx_backup_2 /var/lib/asterisk/bin/backup.php --id=2
Date: May 29, 2015 at 12:00:01 AM CDT

Intializing Backup 2
Backup Lock acquired!
Running pre-backup hooks...
Adding items...
/bin/tar: Removing leading `/' from member names
/bin/tar: Removing leading `/' from member names
/bin/tar: Removing leading `/' from member names
Bulding manifest...
Creating backup...
Storing backup...
Running post-backup hooks...
Backup successfully completed!


Screen Shot 2015-05-29 at 6.41.49 PM.png
 

RPi-Fan

Member
Joined
Jun 8, 2014
Messages
85
Reaction score
13
I am not seeing those errors at all. I actually split my daily backups in two, one for CDRs and settings and one for moh and system audio.
It appears you're not backing up or restoring the /var/www/html path.
 

jeff.h

Guru
Joined
Dec 1, 2010
Messages
502
Reaction score
71
It appears you're not backing up or restoring the /var/www/html path.


Right, just the settings, CDRs, MOH and system audio. I figured why do anything else when you have to have a newly rebuilt system anyway to restore to.
 

RPi-Fan

Member
Joined
Jun 8, 2014
Messages
85
Reaction score
13
Right, just the settings, CDRs, MOH and system audio. I figured why do anything else when you have to have a newly rebuilt system anyway to restore to.
So the fact that your backups and restores work have no relationship to the problem that the OP and I experience (errors restoring the /var/www/html path, which is included in the FULL BACKUP template).
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,200
Reaction score
5,218
Take a look in the incrediblerestore script. I think the /var/www/html root folder was protected with chattr.
 

jeff.h

Guru
Joined
Dec 1, 2010
Messages
502
Reaction score
71
Ok so..... this is what I just got from a full backup......no issue.

Screen Shot 2015-05-30 at 9.08.17 AM.png

I used the full backup option from the right.

Screen Shot 2015-05-30 at 9.08.27 AM.png

This is what I use for my CDRs and settings backup.

Screen Shot 2015-05-30 at 9.08.42 AM.png

This is what I use for my voicemail and system audio backup.

Screen Shot 2015-05-30 at 9.08.50 AM.png


In either case. I get no errors.
 

jeff.h

Guru
Joined
Dec 1, 2010
Messages
502
Reaction score
71
Just did a full restore of the full backup I took earlier this morning in the previous post, again, no issues.

Screen Shot 2015-05-30 at 12.28.27 PM.png
 

Chris Smith

New Member
Joined
Nov 21, 2014
Messages
10
Reaction score
0
I didn't do anything special just installed PiaF via the method suggested right on the site. What user / group owns /usr/local and /var/www/html for you? I got errors on both the backup and restore.

I have also just rebuilt the server with FreePBX 2.9 as requested by my vendor I plan to re-test the backup/restore then to see if anything is different.
 

Members online

Forum statistics

Threads
25,809
Messages
167,750
Members
19,239
Latest member
cajeptha
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top