Hey.
Help write a script 3
-
Create a full backup
-
create an incremental backup
-
Restore backup
-
script
#!/bin/bash
innobackupex --user=root --password=test --no-timestamp /root/backup/full/
innobackupex --apply-log /root/backup/full/
innobackupex --apply-log --redo-only /root/backup/full/
- script
#!/bin/bash
innobackupex --incremental --user=root --no-timestamp --password=test /root/backup/inc --incremental-basedir=/root/backup/full
innobackupex --apply-log --incremental /root/backup/full --incremental-basedir=/root/backup/inc
innobackupex --apply-log --redo-only --incremental /root/backup/full --incremental-basedir=/root/backup/inc
- script
#!/bin/bash
cd /root/dumpdb/
service mysql stop
rm -rf /var/lib/mysql/*
innobackupex --defaults-file=/etc/mysql/my.cnf --copy-back /root/dumpdb
chown mysql:mysql -R /var/lib/mysql
chmod 770 -R /var/lib/mysql
service mysql start
rm -rf /root/dumpdb/*
============================================
1 and 3 working
2 does not work. help me