Page 1 of 1

Automatic DB Backup

PostPosted: Wed Oct 24, 2018 4:13 am
by medk
Hello,

Is there a way to automatically backup the entire asterisk database daily to a usb flash drive connected to the VICIbox server or to DropBox or any other service?

Thanks!

Re: Automatic DB Backup

PostPosted: Wed Oct 24, 2018 6:42 am
by williamconley
1) Get yourself a nice FTP server

2) Put the FTP credentials in /etc/astguiclient.conf in the REPORT server connection information section

3) Run once manually to be sure the ftp transfer succeeds:
Code: Select all
/usr/share/astguiclient/ADMIN_backup.pl --without-web --without-sounds --ftp-transfer --debugX


4) Look in /var/log/astguiclient/archive and on the ftp server to verify success

5) You may need to create the "REPORTS" folder on the ftp server manually, it usually doesn't create that folder for you.

6) When the manual run works as you expect: Put this in your crontab -e
Code: Select all
## Vicidial Backup - without web files or sounds (change if you modify web files or recordings)
## Leave before midnight in case of "emergency backup" during the day ... don't overwrite LAST backup, make a new one!
45 23 * * *  /usr/share/astguiclient/ADMIN_backup.pl --without-web --without-sounds --ftp-transfer >/dev/null 2>&1
#options: --db-only --db-without-logs --without-web --conf-only --without-db --without-conf --without-web --without-sounds
#         --without-voicemail --without-crontab --debugX --debug --test --ftp-transfer