--_000_DC9ABD90CB55EC448B1F682D5731AF74077F0E0E1AIAD2MBX17mex0_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi Jonathan,
This is the script we use in our company for ovirt-engine backups:
#!/bin/bash
DB_EXPORT_PATH=3D/usr/share/ovirt-engine/db-backups
DB_BKUP_FILENAME=3Ddump_engine_`date "+%Y%m%d_%H%M"`.sql
DB_NAME=3Dengine
ENGINE_BKUP_FILENAME=3Dbkup_engine_conf_`date "+%Y%m%d_%H%M"`.tgz
ENGINE_CONF=3D'/etc/jboss-as/jboss-as.conf
/etc/ovirt-engine
/etc/pki/ovirt-engine
/usr/share/ovirt-engine/dbscripts
/usr/share/ovirt-engine/conf
/usr/share/ovirt-engine/resources/jboss
/root/.pgpass
/root/.rnd'
# Perform DB-Backup
pg_dump -C -E UTF8 --column-inserts \
--disable-dollar-quoting \
--disable-triggers \
-U postgres \
--format=3Dp \
-f $DB_EXPORT_PATH/$DB_BKUP_FILENAME \
$DB_NAME
# Perform backup of Engine Configuration
tar zcf $DB_EXPORT_PATH/$ENGINE_BKUP_FILENAME $ENGINE_CONF
# Copy Backups to SMB Backup storage
cp $DB_EXPORT_PATH/$DB_BKUP_FILENAME $DB_EXPORT_PATH/$ENGINE_BKUP_FILENAME =
/mnt/backup
# Remove older backups
find $DB_EXPORT_PATH -mtime +5 -exec rm {}\;
find /mnt/backup -mtime +5 -exec rm {}\;
We have this VM running in a separate KVM Fail-over Cluster, based on LVM.
Generate one or more LVM snapshots (can also be done via monthly cronjobfor=
example) of your engine + data/db backups of your engine should be enough.
Please notice this bash script is currently working for oVirt engine 3.0, s=
o you will maybe need some customizations for 3.1?
Best,
Sven.
Von: users-bounces(a)ovirt.org [mailto:users-bounces@ovirt.org] Im Auftrag vo=
n Jonathan Horne
Gesendet: Montag, 26. November 2012 15:26
An: users(a)ovirt.org
Betreff: [Users] engine backup and recovery
Is there an accepted method to keep the engine backed up for use in disaste=
r recovery scenario? I'm new to postgres, so I'm not sure how to keep it h=
appy with dumps and restores. I've not yet seen a disaster check sheet for=
recovery, but that doesn't mean I didn't google good enough.
Is there a workable process for how this would be recovered after total (en=
gine) system failure?
Thanks,
jonathan
________________________________
This is a PRIVATE message. If you are not the intended recipient, please de=
lete without copying and kindly advise us by e-mail of the mistake in deliv=
ery. NOTE: Regardless of content, this e-mail shall not operate to bind SKO=
POS to any order or other contract unless pursuant to explicit written agre=
ement or government initiative expressly permitting the use of e-mail for s=
uch purpose.
--_000_DC9ABD90CB55EC448B1F682D5731AF74077F0E0E1AIAD2MBX17mex0_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word"
=
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
xmlns=3D"http:=
//www.w3.org/TR/REC-html40"><head><meta http-equiv=3DContent-Type
content=
=3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator
content=3D"Micros=
oft Word 14 (filtered medium)"><!--[if !mso]><style>v\:*
{behavior:url(#def=
ault#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.apple-style-span
{mso-style-name:apple-style-span;}
span.E-MailFormatvorlage18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US
link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span
style=3D'f=
ont-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi
Jonath=
an,<o:p></o:p></span></p><p class=3DMsoNormal><span
style=3D'font-size:11.0=
pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></spa=
n></p><p class=3DMsoNormal><span
style=3D'font-size:11.0pt;font-family:"Cal=
ibri","sans-serif";color:#1F497D'>This is the script we use in our
company =
for ovirt-engine backups:<o:p></o:p></span></p><p
class=3DMsoNormal><span s=
tyle=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>=
<o:p> </o:p></span></p><p
class=3DMsoNormal><span style=3D'font-size:8=
.0pt;font-family:"Courier
New";color:#1F497D'>#!/bin/bash<o:p></o:p></span>=
</p><p class=3DMsoNormal><span
style=3D'font-size:8.0pt;font-family:"Courie=
r
New";color:#1F497D'><o:p> </o:p></span></p><p
class=3DMsoNormal><spa=
n style=3D'font-size:8.0pt;font-family:"Courier
New";color:#1F497D'>DB_EXPO=
RT_PATH=3D/usr/share/ovirt-engine/db-backups<o:p></o:p></span></p><p
class=
=3DMsoNormal><span style=3D'font-size:8.0pt;font-family:"Courier
New";color=
:#1F497D'>DB_BKUP_FILENAME=3Ddump_engine_`date
"+%Y%m%d_%H%M"`.sq=
l<o:p></o:p></span></p><p class=3DMsoNormal><span
style=3D'font-size:8.0pt;=
font-family:"Courier
New";color:#1F497D'>DB_NAME=3Dengine<o:p></o:p></span>=
</p><p class=3DMsoNormal><span
style=3D'font-size:8.0pt;font-family:"Courie=
r
New";color:#1F497D'><o:p> </o:p></span></p><p
class=3DMsoNormal><spa=
n style=3D'font-size:8.0pt;font-family:"Courier
New";color:#1F497D'>ENGINE_=
BKUP_FILENAME=3Dbkup_engine_conf_`date
"+%Y%m%d_%H%M"`.tgz<o:p></=
o:p></span></p><p class=3DMsoNormal><span
style=3D'font-size:8.0pt;font-fam=
ily:"Courier
New";color:#1F497D'><o:p> </o:p></span></p><p
class=3DMso=
Normal><span style=3D'font-size:8.0pt;font-family:"Courier
New";color:#1F49=
7D'>ENGINE_CONF=3D'/etc/jboss-as/jboss-as.conf<o:p></o:p></span></p><p
clas=
s=3DMsoNormal><span style=3D'font-size:8.0pt;font-family:"Courier
New";colo=
r:#1F497D'> &nbs=
p; /etc/ovirt-engine<o:p></o:p></span></p><p
class=3DMsoNormal><span style=
=3D'font-size:8.0pt;font-family:"Courier
New";color:#1F497D'> &n=
bsp;
/etc/pki/ovirt-engine<=
o:p></o:p></span></p><p class=3DMsoNormal><span
style=3D'font-size:8.0pt;fo=
nt-family:"Courier
New";color:#1F497D'> =
/usr/share/ovirt-engine/dbscripts<o:p></o:p>=
</span></p><p class=3DMsoNormal><span
style=3D'font-size:8.0pt;font-family:=
"Courier
New";color:#1F497D'> &nbs=
p;
/usr/share/ovirt-engine/conf<o:p></o:p></span></p><p c=
lass=3DMsoNormal><span style=3D'font-size:8.0pt;font-family:"Courier
New";c=
olor:#1F497D'> &=
nbsp;
/usr/share/ovirt-engine/resources/jboss<o:p></o:p></span></p><p
class=
=3DMsoNormal><span style=3D'font-size:8.0pt;font-family:"Courier
New";color=
:#1F497D'>  =
; /root/.pgpass<o:p></o:p></span></p><p
class=3DMsoNormal><span style=3D'fo=
nt-size:8.0pt;font-family:"Courier
New";color:#1F497D'> &n=
bsp;
/root/.rnd'<o:p></o:p></span=
</p><p class=3DMsoNormal><span
style=3D'font-size:8.0pt;font-family:"Couri=
er
New";color:#1F497D'><o:p> </o:p></span></p><p
class=3DMsoNormal><sp=
an style=3D'font-size:8.0pt;font-family:"Courier
New";color:#1F497D'># Perf=
orm DB-Backup<o:p></o:p></span></p><p
class=3DMsoNormal><span style=3D'font=
-size:8.0pt;font-family:"Courier New";color:#1F497D'>pg_dump -C -E UTF8
--c=
olumn-inserts \<o:p></o:p></span></p><p
class=3DMsoNormal><span style=3D'fo=
nt-size:8.0pt;font-family:"Courier
New";color:#1F497D'> &n=
bsp;  =
; --disable-dollar-quoting
\<o:p></o:p></span></p><p class=3DMs=
oNormal><span style=3D'font-size:8.0pt;font-family:"Courier
New";color:#1F4=
97D'> &nbs=
p; --disable-triggers
\<o:p></o:p></spa=
n></p><p class=3DMsoNormal><span
style=3D'font-size:8.0pt;font-family:"Cour=
ier
New";color:#1F497D'> &nb=
sp;
-U postgres \<o:p=
</o:p></span></p><p class=3DMsoNormal><span
style=3D'font-size:8.0pt;font-=
family:"Courier
New";color:#1F497D'> &nb=
sp;
--for=
mat=3Dp \<o:p></o:p></span></p><p class=3DMsoNormal><span
style=3D'font-siz=
e:8.0pt;font-family:"Courier
New";color:#1F497D'> &n=
bsp;
&nbs=
p; -f $DB_EXPORT_PATH/$DB_BKUP_FILENAME
\<o:p></o:p></span></p><p clas=
s=3DMsoNormal><span style=3D'font-size:8.0pt;font-family:"Courier
New";colo=
r:#1F497D'> &nbs=
p;
$DB_NAME<o:p></o:p></span></p>=
<p class=3DMsoNormal><span style=3D'font-size:8.0pt;font-family:"Courier
Ne=
w";color:#1F497D'><o:p> </o:p></span></p><p
class=3DMsoNormal><span st=
yle=3D'font-size:8.0pt;font-family:"Courier New";color:#1F497D'>#
Perform b=
ackup of Engine Configuration<o:p></o:p></span></p><p
class=3DMsoNormal><sp=
an style=3D'font-size:8.0pt;font-family:"Courier
New";color:#1F497D'>tar zc=
f $DB_EXPORT_PATH/$ENGINE_BKUP_FILENAME
$ENGINE_CONF<o:p></o:p></span></p><=
p class=3DMsoNormal><span style=3D'font-size:8.0pt;font-family:"Courier
New=
";color:#1F497D'><o:p> </o:p></span></p><p
class=3DMsoNormal><span sty=
le=3D'font-size:8.0pt;font-family:"Courier New";color:#1F497D'># Copy
Backu=
ps to SMB Backup storage<o:p></o:p></span></p><p
class=3DMsoNormal><span st=
yle=3D'font-size:8.0pt;font-family:"Courier New";color:#1F497D'>cp
$DB_EXPO=
RT_PATH/$DB_BKUP_FILENAME $DB_EXPORT_PATH/$ENGINE_BKUP_FILENAME /mnt/backup=
<o:p></o:p></span></p><p class=3DMsoNormal><span
style=3D'font-size:8.0pt;f=
ont-family:"Courier
New";color:#1F497D'><o:p> </o:p></span></p><p
clas=
s=3DMsoNormal><span style=3D'font-size:8.0pt;font-family:"Courier
New";colo=
r:#1F497D'># Remove older
backups<o:p></o:p></span></p><p class=3DMsoNormal=
<span style=3D'font-size:8.0pt;font-family:"Courier
New";color:#1F497D'>fi=
nd $DB_EXPORT_PATH -mtime +5 -exec rm
{}\;<o:p></o:p></span></p><p class=3D=
MsoNormal><span style=3D'font-size:8.0pt;font-family:"Courier
New";color:#1=
F497D'>find /mnt/backup -mtime +5 -exec rm
{}\;<o:p></o:p></span></p><p cla=
ss=3DMsoNormal><span style=3D'font-size:8.0pt;font-family:"Courier
New";col=
or:#1F497D'><o:p> </o:p></span></p><p
class=3DMsoNormal><span style=3D=
'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>We
have=
this VM running in a separate KVM Fail-over Cluster, based on LVM. <br>Gen=
erate one or more LVM snapshots (can also be done via monthly cronjobfor ex=
ample) of your engine + data/db backups of your engine should be enough.<br=
<br><o:p></o:p></span></p><p
class=3DMsoNormal><span style=3D'font-size:11=
.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Please
notice this b=
ash script is currently working for oVirt engine 3.0, so you will maybe nee=
d some customizations for 3.1?<o:p></o:p></span></p><p
class=3DMsoNormal><s=
pan
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F4=
97D'><o:p> </o:p></span></p><p
class=3DMsoNormal><span style=3D'font-s=
ize:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o=
:p></span></p><p class=3DMsoNormal><span lang=3DDE
style=3D'font-size:11.0p=
t;font-family:"Calibri","sans-serif";color:#1F497D'>Best,<o:p></o:p></span>=
</p><p class=3DMsoNormal><span lang=3DDE
style=3D'font-size:11.0pt;font-fam=
ily:"Calibri","sans-serif";color:#1F497D'>Sven.
<o:p></o:p></span></p><p cl=
ass=3DMsoNormal><span lang=3DDE
style=3D'font-size:11.0pt;font-family:"Cali=
bri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div
styl=
e=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>=
<p class=3DMsoNormal><b><span lang=3DDE
style=3D'font-size:10.0pt;font-fami=
ly:"Tahoma","sans-serif"'>Von:</span></b><span
lang=3DDE style=3D'font-size=
:10.0pt;font-family:"Tahoma","sans-serif"'>
users-bounces(a)ovirt.org [mailto=
:users-bounces@ovirt.org] <b>Im Auftrag von </b>Jonathan
Horne<br><b>Gesend=
et:</b> Montag, 26. November 2012 15:26<br><b>An:</b>
users(a)ovirt.org<br><b=
Betreff:</b> [Users] engine backup and
recovery<o:p></o:p></span></p></div=
</div><p
class=3DMsoNormal><o:p> </o:p></p><div><div><div><p
class=3D=
MsoNormal><span
style=3D'font-size:10.5pt;font-family:"Calibri","sans-serif=
";color:black'>Is there an accepted method to keep the engine backed up for=
use in disaster recovery scenario? I'm new to postgres, so I'm not s=
ure how to keep it happy with dumps and restores. I've not yet seen a=
disaster check sheet for recovery, but that doesn't mean I didn't google g=
ood enough.<o:p></o:p></span></p></div><div><p
class=3DMsoNormal><span styl=
e=3D'font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><o:p>=
</o:p></span></p></div><div><p
class=3DMsoNormal><span style=3D'font-=
size:10.5pt;font-family:"Calibri","sans-serif";color:black'>Is
there a work=
able process for how this would be recovered after total (engine) system fa=
ilure?<o:p></o:p></span></p></div><div><p
class=3DMsoNormal><span style=3D'=
font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><o:p> =
;</o:p></span></p></div><div><p
class=3DMsoNormal><span style=3D'font-size:=
10.5pt;font-family:"Calibri","sans-serif";color:black'>Thanks,<o:p></o:p></=
span></p></div><div><p class=3DMsoNormal><span
style=3D'font-size:10.5pt;fo=
nt-family:"Calibri","sans-serif";color:black'>jonathan<o:p></o:p></span></p=
</div><div><div><div><p
class=3DMsoNormal><span style=3D'color:black'><o:p=
</o:p></span></p></div><div><p
class=3DMsoNormal><span style=3D'font=
-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o=
:p></span></p></div></div></div></div></div><p
class=3DMsoNormal><span styl=
e=3D'color:black'><o:p> </o:p></span></p><div
class=3DMsoNormal align=
=3Dcenter style=3D'text-align:center'><span
style=3D'color:black'><hr size=
=3D2 width=3D"100%" align=3Dcenter></span></div><p
class=3DMsoNormal><span =
style=3D'font-size:7.5pt;font-family:"Arial","sans-serif";color:gray'>This
=
is a PRIVATE message. If you are not the intended recipient, please delete =
without copying and kindly advise us by e-mail of the mistake in delivery. =
NOTE: Regardless of content, this e-mail shall not operate to bind SKOPOS t=
o any order or other contract unless pursuant to explicit written agreement=
or government initiative expressly permitting the use of e-mail for such p=
urpose.</span><span style=3D'color:black'>
<o:p></o:p></span></p></div></bo=
dy></html>=
--_000_DC9ABD90CB55EC448B1F682D5731AF74077F0E0E1AIAD2MBX17mex0_--