by mflorell » Thu Jan 19, 2017 6:41 am
Here's the built-in backup script in VICIdial:
# /usr/share/astguiclient/ADMIN_backup.pl --help
allowed run time options:
[--db-only] = only backup the database
[--db-settings-only] = only backup the database without leads, logs, servers or phones
[--db-without-logs] = do not backup the log tables in the database
[--db-without-archives] = do not backup the archive tables in the database
[--dbs-selected=X] = backup only selected databases, default uses conf file db only
to backup databases X and Y, use X---Y, can use --ALL-- for all dbs on server
you can use --ALLNS-- for all non-mysql dbs(will ignore 'test', 'mysql','information_schema')
This feature will NOT work with '--db_raw_files_copy' option
[--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 the 'REPORTS' FTP server
[--ftp-server=XXXXXXXX] = OVERRIDE FTP server to send file to
[--ftp-login=XXXXXXXX] = OVERRIDE FTP user
[--ftp-pass=XXXXXXXX] = OVERRIDE FTP pass
[--ftp-dir=XXXXXXXX] = OVERRIDE remote FTP server directory to post files to
[--debugX] = super debug
[--debug] = debug
[--test] = test
[--db_raw_files_copy] = if set the backup won't be a mysql dump. It will tar the /var/lib/mysql folder. WARNING, THIS OPTION WILL STOP THE MYSQL SERVER!
[--archive_path=/PATH/FROM/ROOT] = absolute path to store the resulting backup
This will create gz files, one of which contains the database, just move that file to the new server, unzip it and import it into mysql.