* [linux-lvm] Simple scripts for use in automated backups?
@ 2008-04-23 13:15 Charles Marcus
2008-04-23 13:23 ` Dan Kegel
2008-04-23 13:35 ` Tomasz Chmielewski
0 siblings, 2 replies; 5+ messages in thread
From: Charles Marcus @ 2008-04-23 13:15 UTC (permalink / raw)
To: LVM general discussion and development
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?...
Thanks for any responses, including decent how-to's, etc...
--
Best regards,
Charles
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Simple scripts for use in automated backups?
2008-04-23 13:15 [linux-lvm] Simple scripts for use in automated backups? Charles Marcus
@ 2008-04-23 13:23 ` Dan Kegel
2008-04-23 13:35 ` Tomasz Chmielewski
1 sibling, 0 replies; 5+ messages in thread
From: Dan Kegel @ 2008-04-23 13:23 UTC (permalink / raw)
To: LVM general discussion and development
Charles Marcus <CMarcus@media-brokers.com> wrote:
> 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?...
Here's a few links I dug up a couple weeks ago on how
people use lvm to back up mysql:
http://en.oreilly.com/mysql2008/public/schedule/detail/252
http://forum.mysqlperformanceblog.com/s/m/782/
http://lenz.homelinux.org/mylvmbackup/
http://jcole.us/blog/archives/2006/04/25/plugin-based-backup-for-mysql/
http://www.mysqlperformanceblog.com/2006/08/21/using-lvm-for-mysql-backup-and-replication-setup/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Simple scripts for use in automated backups?
2008-04-23 13:15 [linux-lvm] Simple scripts for use in automated backups? Charles Marcus
2008-04-23 13:23 ` Dan Kegel
@ 2008-04-23 13:35 ` Tomasz Chmielewski
2008-04-23 16:12 ` Charles Marcus
2008-04-23 19:18 ` Stuart D. Gathman
1 sibling, 2 replies; 5+ messages in thread
From: Tomasz Chmielewski @ 2008-04-23 13:35 UTC (permalink / raw)
To: LVM general discussion and development
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Simple scripts for use in automated backups?
2008-04-23 13:35 ` Tomasz Chmielewski
@ 2008-04-23 16:12 ` Charles Marcus
2008-04-23 19:18 ` Stuart D. Gathman
1 sibling, 0 replies; 5+ messages in thread
From: Charles Marcus @ 2008-04-23 16:12 UTC (permalink / raw)
To: LVM general discussion and development
>> 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.
<snip>
> Here's a few links I dug up a couple weeks ago on how
> people use lvm to back up mysql:
Thanks! helps a lot...
--
Best regards,
Charles
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Simple scripts for use in automated backups?
2008-04-23 13:35 ` Tomasz Chmielewski
2008-04-23 16:12 ` Charles Marcus
@ 2008-04-23 19:18 ` Stuart D. Gathman
1 sibling, 0 replies; 5+ messages in thread
From: Stuart D. Gathman @ 2008-04-23 19:18 UTC (permalink / raw)
To: LVM general discussion and development
On Wed, 23 Apr 2008, Tomasz Chmielewski wrote:
> *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
Even easier, the shell considers exit code 0 as "true", so the above is simply:
if lvmcommand --option1 --option2; then
do_this
else
do_that
fi
--
Stuart D. Gathman <stuart@bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-04-23 19:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 13:15 [linux-lvm] Simple scripts for use in automated backups? Charles Marcus
2008-04-23 13:23 ` Dan Kegel
2008-04-23 13:35 ` Tomasz Chmielewski
2008-04-23 16:12 ` Charles Marcus
2008-04-23 19:18 ` Stuart D. Gathman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.