Sentora Support Forums
Backing Up MySQL databases - Printable Version

+- Sentora Support Forums (https://senforums.mach-hosting.com)
+-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5)
+--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32)
+---- Forum: General Support Forum v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=36)
+---- Thread: Backing Up MySQL databases (/showthread.php?tid=4264)



Backing Up MySQL databases - rsthomas - 12-18-2017

Is there a way to backup just the databases within Sentora, separate from the daily Admin backup of all of the domains' public_html files and their databases?

Alternatively, can a PHP script be written that can do the job from the adminstration (zadmin) level? Or, even a script to run with SSH?


RE: Backing Up MySQL databases - Me.B - 12-20-2017

modify this script to backup only db's.

https://github.com/MBlagui/Sentora-tools/blob/master/backupuserfiles.sh


M B


RE: Backing Up MySQL databases - rsthomas - 12-22-2017

(12-20-2017, 07:53 AM)Me.B Wrote: modify this script to backup only db's.

https://github.com/MBlagui/Sentora-tools/blob/master/backupuserfiles.sh


M B

Perfect!!

Had to change "zpanel_core" to "sentora_core," and it flew right through all the databases very quickly.

Thank you very much!

Follow-up:
To store the backup files in one common location:
#backupfolder="$5/backups"
backupfolder="/var/zpanel/hostdata/zadmin/backups"

You can quickly verify they are all there:
ls -l /var/zpanel/hostdata/zadmin/backups/

Login to the zadmin account and check the backups folder to view and/or download, or use your FTP program.