mysql backup
Moderator: Lillian.W@AST
- James.W@AST
- Posts: 189
- youtube meble na wymiar Warszawa
- Joined: Wed Jun 06, 2012 12:50 am
Re: mysql backup
by the way, mysqldump should be available since 1.0.9
To Infinity and Beyond!
Friends of My AS-606T: (RAID 5 with WD Black 2TB * 4, WD Red 2TB * 2)
MacBook Air (10.8) & Self-assembled Windows PC (Windows 7)
iPhone 4S (iOS 6) & iPad 2 (iOS 6)
Boxee Box, Logitech Squeezebox Duet
SONY HT-CT150 Sound Bar (Connected directly to the NAS via HDMI)
CISCO Linksys E4200
Friends of My AS-606T: (RAID 5 with WD Black 2TB * 4, WD Red 2TB * 2)
MacBook Air (10.8) & Self-assembled Windows PC (Windows 7)
iPhone 4S (iOS 6) & iPad 2 (iOS 6)
Boxee Box, Logitech Squeezebox Duet
SONY HT-CT150 Sound Bar (Connected directly to the NAS via HDMI)
CISCO Linksys E4200
-
- Posts: 476
- Joined: Wed Mar 13, 2013 5:38 am
Re: mysql backup
nice workJames.W@AST wrote:by the way, mysqldump should be available since 1.0.9
608t
-
- Posts: 28
- Joined: Wed Oct 02, 2013 6:37 pm
Re: mysql backup
I'm trying to use this script and testing it by executing it as root before I schedule it using cron. I get the following error:
The sql user and password exist and have all rights to all databases. (I've hard-coded these for now). I've also tried using no password and the root account for sql -- no joy.
The share sqlbackup exists and has RW access for everyone.
What else do I need to check?
Code: Select all
Backing up database performance_schema to /volume1/sqlbackup/mysql/performance_schema.sql\n
/volume1/sqlbackup/mysqlbackup.sh: line 74: /volume0/usr/builtin/sbin: Permission denied
The share sqlbackup exists and has RW access for everyone.
What else do I need to check?
-
- Posts: 476
- Joined: Wed Mar 13, 2013 5:38 am
Re: mysql backup
there was a bug in the script, I have uploaded v1.1 please try this oneatiras wrote:I'm trying to use this script and testing it by executing it as root before I schedule it using cron. I get the following error:
The sql user and password exist and have all rights to all databases. (I've hard-coded these for now). I've also tried using no password and the root account for sql -- no joy.Code: Select all
Backing up database performance_schema to /volume1/sqlbackup/mysql/performance_schema.sql\n /volume1/sqlbackup/mysqlbackup.sh: line 74: /volume0/usr/builtin/sbin: Permission denied
The share sqlbackup exists and has RW access for everyone.
What else do I need to check?
608t
-
- Posts: 476
- Joined: Wed Mar 13, 2013 5:38 am
-
- Posts: 395
- Joined: Tue Aug 25, 2015 9:23 pm
Re: mysql backup
Helloho66es wrote:Ok this is the script I am using from cron
cron entry is
this is designed to be run before my backups to remote location so that the database is fully backed up daily and previous backups are archived. The backup dumps each database to a separate sql file and is commented where your install may differ from mine (I run the script from a share called misc, the backups go to a share called backup and the password for the backup user is stored in a file /etc/backuppass the only contents of that file are the password.Code: Select all
# backup prep 10 1 * * * /volume1/misc/mysqlbackup.sh
*updated script* please feel free to read and get back to me with any ideas for changes / fixes. If you choose to try this please understand I make no guarantees other than it works for me and on my austor and I will not be responsible if it damages the contents of your nas in any way etc etc.
Two corrections to do : replace LOC_C by LOG_C 2 times.
- Gunthor
- Posts: 116
- Joined: Sun Jun 23, 2013 6:04 pm
- Location: Germany - Stuttgart
Re: mysql backup
Thank you ho66es - What a wonderful and highly professional solution. I love the system log entries. Works like a charm. I messed up 70 data records in one of my MySql databases today - managed to recreate them with quite some time - and was just looking for an automatic solution for regular updates. Again: "Thank you for sharing..."
Since 07/2023: Asustor AS6702T, (2 x Seagate IronWolf 12TB, RAID 1)
Old: Asustor AS-604RS, ADM 3.1.2.RHG1 (4 x WD Red WD30EFRX 3TB, RAID 5)
Old: Asustor AS-604RS, ADM 3.1.2.RHG1 (4 x WD Red WD30EFRX 3TB, RAID 5)