Run a backup from a script

Hi All,
Without the option of creating a backup offsite we are looking at using a file transfer tool that runs a script to create a backup and then transfer it. So is there already a script we can use?

We have already got this working but with VitalPBX running the backup and then the transfer tool doing the copy. The utility we are using is it will send an email when the transfer job is carried out and is quite detailed so at least we know if we get an issue our backups are ready to go from our backup platform.

Happy to share our config once I get this nailed.



Why do you want something else?
Sounds like a good solution.
You can do it with a shell script but it does the same as your programm.

Hi Mo,
Not sure I fully understand your question but I think you are asking Why do you want something else to run the backup? What I would like to do is run the script that VitalPBX uses to perform the backup but in our transfer tool. Just one process from our end to configure and we get information back from the email if that has run properly. Vital does not provide that yet. Hopefully in the near future VitalPBX will provide backup to offsite and reporting of this but while they don’t I want to have a strong backup strategy.



You can list the backup CRONS using the command below. Inside of each file, you will find the script to execute.

ll /etc/cron.d/ | grep buildBackup
-rw-r--r--  1 root root  70 Jul 14  2021 buildBackup1

Open the desired CRON file and use the script inside for your application.

cat /etc/cron.d/buildBackup1
0 0 1 * * root /usr/share/vitalpbx/scripts/backups 1 3 "buildBackup1"

This would be the script to use in your app.

/usr/share/vitalpbx/scripts/backups 1 3 "buildBackup1"

Hi Miguel,
That’s exactly what I needed. Will test and feedback…



This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.