[HOWTO] Make automatic backup of ALL MySQL / MariaSQL databases on QNAP V3.8

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Post Reply
datorexpert
Been there, done that
Posts: 743
Joined: Mon Nov 16, 2009 4:14 pm

Re: [HOWTO] Make automatic backup of ALL MySQL / MariaSQL databases on QNAP V3.8

Post by datorexpert » Tue Sep 17, 2019 10:18 pm

When did you upgrade the firmware the last time?
Is it a permission issue (guessing)?
QTS 4.1.n/4.2.n/4.3.n/4.4.n MANUAL
Submit QNAP Support Ticket - QNAP Tutorials, Wiki - Product Support Status - Moogle's QNAP FAQ help V2 - QNAP Security Advisory
When you ask a question, please include the following:
Data md_checker nasreport (release 20180525)
=
Model: TVS-873e -- RAM: 20G -- FW: QTS 4.4.2.1302 build 20200512 (used as main storage + applications)
WD60EFRX-68L0BN1(x5) / WD80EFAX-68LHPN0(x1) Red HDDs -- RAID5: 6x6TB -- Cold spare: None
=
Model: TS-453B -- RAM: 8G -- FW: QTS 4.4.1.0978 build 20190626 -- BROKEN
=
Model: SS-839 -- SOLD after 12 years use! Never lost ANY data!
=
12 years of QNAP experience + Asustor and WD!

dehein2
Getting the hang of things
Posts: 50
Joined: Fri Oct 07, 2011 5:32 pm

Re: [HOWTO] Make automatic backup of ALL MySQL / MariaSQL databases on QNAP V3.8

Post by dehein2 » Wed Sep 18, 2019 1:56 am

not for a while (~6month), so nothing changed from the system side

dehein2
Getting the hang of things
Posts: 50
Joined: Fri Oct 07, 2011 5:32 pm

Re: [HOWTO] Make automatic backup of ALL MySQL / MariaSQL databases on QNAP V3.8

Post by dehein2 » Mon Sep 23, 2019 9:03 pm

and the script is able to access the folder, otherwise I wouldn't have any backups, would i?

User avatar
fribse
Experience counts
Posts: 2079
Joined: Mon Feb 11, 2008 2:50 am
Location: Greve, Denmark
Contact:

Re: [HOWTO] Make automatic backup of ALL MySQL / MariaSQL databases on QNAP V3.8

Post by fribse » Wed Dec 18, 2019 7:20 pm

@dehein2: Darned, sorry I haven't received your messages, for some reason I don't get notified, and at the moment I'm doing a lot of home automation in Home Assistant, and setting up LED light and all, so I've sort of lost track of this project.
Try two things, set loglevel up in the settings, and try and run the script by hand to see what it outputs.
What NAS is it, and what OS is it?
Best regards
Fribse

NO, RAID is NOT backup - Use RAID-Certified 24x7 drives for raid
HOWTO's:
Make automatic backup of ALL MySQL databases http://forum.qnap.com/viewtopic.php?f=32&t=15628

NAS-659 Pro II (3 GB Ram), Raid1, Survailance station, local backup destination + NAS-853A (16 GB Ram), Virtualization Station, Plex, iDrive
Network: Fritz!Box 7560 + 24p SG200 + 2x8p SG200 + 8p POE EdgeCore + 300/300 mbit Internet

Pompe
New here
Posts: 2
Joined: Tue Oct 11, 2011 5:48 am

Re: [HOWTO] Make automatic backup of ALL MySQL / MariaSQL databases on QNAP V3.8

Post by Pompe » Fri Dec 27, 2019 7:53 am

Hi

Thanks for a great script, I am close to getting it to work on my NAS, TS-219II with 4.3.3.1098

I got this error msg and the compressed file where empty
share/Backups/mysqlbackup/bin/mysqlbackup.sh: line 212: [: missing `]'
MySQL Backup: INFO: Backup Successfull
MySQL Backup: INFO: Creating a daily archive
MySQL Backup: INFO: Compressing backup to /share/MD0_DATA/Backups/MYSQL/mysql.daily/191227.tar.gz
MySQL Backup: ERROR: compressing backup
Any ideas of a solution would be appreciated with great thanks.
Best Regards
Pontus
_____________________________
Qnap TS-219P II
Firmware: 4.3.3.1098

dehein2
Getting the hang of things
Posts: 50
Joined: Fri Oct 07, 2011 5:32 pm

Re: [HOWTO] Make automatic backup of ALL MySQL / MariaSQL databases on QNAP V3.8

Post by dehein2 » Fri Jan 10, 2020 8:12 pm

@fribse

thanks for getting back. For whatever reason ;) it works flawless again
Best

Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”