Date: Tue, 4 Sep 2007 02:12:29 +0200 From: "Maikel Lambregts" <maikel.lambregts@yahoo.com> To: <freebsd-questions@freebsd.org> Subject: problem with running mdconfig from shell script Message-ID: <20070904003709.9061313C45D@mx1.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070904003709.9061313C45D>