[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [linux-lvm] Simple scripts for use in automated backups?
- From: Tomasz Chmielewski <mangoo wpkg org>
- To: LVM general discussion and development <linux-lvm redhat com>
- Subject: Re: [linux-lvm] Simple scripts for use in automated backups?
- Date: Wed, 23 Apr 2008 15:35:11 +0200
Charles Marcus schrieb:
Hello again,
Sorry to flood the list with newbie questions... if there is a better
list for things like this, please let me know...
I'm still fairly new to linux (coming from windows world), and enjoying
the freedom, but as far as scripting goes - well, to call me a noob is
being kind...
Would any kind souls be willing to share some basic scripts that can be
used to activate a snapshot, then 'do x' (this would be my rsnapshot
command), then release the snapshot? The part that I don't have a clue
about is how to check for errors - ie, did the snapshot activate ok? Did
it release ok?...
*Usually*, a command exits with code 0 if it finishes with a success.
In bash, you can check the exit code with $? variable.
So:
lvmcommand --option1 --option2
if [ $? -eq 0 ] ; then
do_this
else
do_that
fi
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]