I’ve got another question.
I was wondering how I could setup a backup system using windows and a NAS.
I know how to perform an SQL dump via the linux terminal itself as mysqldump but I would like to find a way to use windows or maybe even via Linux if possible to create an sqldump of all databases and save that backup not on the FreePBX machine but directly to a windows server or NAS solution.
Could anyone help me out how I could do this?
Do I need to use rsync or SAMBA or can I just run a task from windows which connects to the FreePBX mysql database with, for example, user = root and password = passw0rd?
Or do I create a cronjob which just moves the file to the NAS?
Thx for the info.
But I’d prefer to not use a backup module and use a script instead.
As like dumping an sql file simply to a folder on the FreePBX and then maybe have it placed to a NAS.
This is more of a SAMBA thing right?
Or what would be even more nifty, having a windows server accessing the mysql database, creating it and moving it to the correct location.
Would I require samba then? Or can I use a windows sql application which allows me to connect to the FreePBX mysql database by using the user and password for mysql from FreePbx?
Could you please elaborate on that SkykingOH?
I know I’m asking a lot and you could say “google it” but a step by step guid would be nice.
As in what to put in the windows script, opening ports if needed… etc etc, the full works :).
I don’t know how to write “windows script” as if there is any such thing. You would have to write it in a programming language that supports sql connections.
I can’t teach you all of that in forum posts. Get a book on SQL and start reading if you are interested.
If you don’t understand how to do what you are trying why not use the perfectly functional backup module?
Besides, if backup is your goal you do realize the DB is just part of the puzzle? You have to backup the astdb (that is in Berkeley format) along with provisioning directories, voice mail and recordings (flat files) and the system files.
Well I have an rsync script I created a while back that I could use to create a backup of the database AND any other required files but the people here want me to ONLY backup the database to windows or a NAS.
@dicko: The only important file I know of in /var/lib/asterisk/ is the astdb file, as for /var/spool/asterisk, I don’t think I need anything from there.
I’ve tested restoring Freepbx by re-importing the database, copying over astdb, /etc/asterisk and /tftpboot and I think I had everything back as it was.
Am I missing something?