[systembackup] rename functions
This commit is contained in:
parent
962d6c8e39
commit
6a247d72dc
10
systembackup
10
systembackup
@ -11,14 +11,14 @@ if [ "y" == "$MYSQL" ]; then
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
mount() {
|
mount_snapshot() {
|
||||||
echo "mounting /var/lib/mysql-snapshot..."
|
echo "mounting /var/lib/mysql-snapshot..."
|
||||||
mkdir -p /var/lib/mysql-snapshot
|
mkdir -p /var/lib/mysql-snapshot
|
||||||
/bin/mount /dev/vg0/mysql-snapshot /var/lib/mysql-snapshot
|
mount /dev/vg0/mysql-snapshot /var/lib/mysql-snapshot
|
||||||
echo "mounted /var/lib/mysql-snapshot."
|
echo "mounted /var/lib/mysql-snapshot."
|
||||||
}
|
}
|
||||||
|
|
||||||
lock() {
|
create_snapshot() {
|
||||||
echo "locking database..."
|
echo "locking database..."
|
||||||
mysql << EOF
|
mysql << EOF
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
@ -60,8 +60,8 @@ set -e
|
|||||||
trap cleanup SIGHUP SIGINT SIGTERM
|
trap cleanup SIGHUP SIGINT SIGTERM
|
||||||
|
|
||||||
if [ "y" == "$MYSQL" ]; then
|
if [ "y" == "$MYSQL" ]; then
|
||||||
lock
|
create_snapshot
|
||||||
mount
|
mount_snapshot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user