Page 1 of 1

Database backup using ADMIN_backup.pl contains no data

PostPosted: Thu Jun 06, 2013 4:44 am
by venablc
Hi,

I am using ADMIN_backup.pl to do a full daily backup however I have just noticed that the database backup doesn't actually include any data!

The output when running ADMIN_backup.pl shows the following command running:

Code: Select all
/usr/bin/mysqldump --user=cron --password=1234 --lock-all-tables  --flush-logs asterisk | /usr/bin/gzip >
/var/log/astguiclient/archive/temp/192.168.202.11asterisk4.gz


and the backup file is succesfully created but all it contains is:

Code: Select all
-- MySQL dump 10.13  Distrib 5.5.25, for Linux (x86_64)
--
-- Host: localhost    Database: asterisk
-- ------------------------------------------------------
-- Server version       5.5.25-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2013-06-06  9:10:24



There is no error thrown and I have checked the the database name "asterisk" is correct.

The command for doing the backup in ADMIN_backup.pl was altered slightly changing "--lock-tables" to "--lock-all-tables" because the former caused the following error:

mysqldump: Got error: 1105: Unknown error when doing refresh


I don't know whether this change has something to do with why my backups don't contain any data?

Re: Database backup using ADMIN_backup.pl contains no data

PostPosted: Thu Jun 06, 2013 7:47 am
by striker
try the help option , and run respective label with debugX label.
foreg: ADMIN_backup.pl --db-only --debugX
ADMIN_backup.pl --help
allowed run time options:
[--db-only] = only backup the database
[--db-without-logs] = do not backup the log tables in the database
[--conf-only] = only backup the asterisk conf files
[--without-db] = do not backup the database
[--without-conf] = do not backup the conf files
[--without-web] = do not backup web files
[--without-sounds] = do not backup asterisk sounds
[--without-voicemail] = do not backup asterisk voicemail
[--without-crontab] = do not backup crontab
[--ftp-transfer] = Transfer backup to FTP server
[--debugX] = super debug
[--debug] = debug
[--test] = test

Re: Database backup using ADMIN_backup.pl contains no data

PostPosted: Fri Jun 07, 2013 5:24 am
by DomeDan
Have seen this before.. yeah found it viewtopic.php?f=8&t=26789#p97763
and it seams like the solution is to do:
/bin/chmod 655 /var/log/mysql