problem with running mdconfig from shell script
Maikel Lambregts
maikel.lambregts at yahoo.com
Mon Sep 3 17:37:10 PDT 2007
Hi,
I want to make automatic backup of my MySQL by using FreeBSD snapshots. All
works fine when I run the commands from my Putty, but when I run them from a
shell script the 2th command (mdconfig) gives an error.
These are the comments to make the backup, that work fine from Putty =>
========================================
/usr/local/bin/mysql -u??? -p??? -e "FLUSH TABLES WITH READ LOCK;system
mksnap_ffs /usr /usr/snapshot;UNLOCK TABLES;"
mdconfig -a -t vnode -f /usr/snapshot -u 4
mount -r /dev/md4 /mnt
tar -cvjf /usr/home/mysqlsnapshot.tar.bz2 /mnt/home/databases
umount /mnt
mdconfig -d -u 4
rm -f /usr/snapshot
========================================
I get this error when I run the above from a .sh script =>
myserver# ./mysqlsnapshot.sh
: not found
mdconfig: bad unit: 4
: No such file or directory
More information about the freebsd-questions
mailing list