VMware Cloud Community
drharrold
Contributor
Contributor

Backup of embedded database

How are peopling backing up the embedded database in the replication appliance?

And a slightly related question, how can I migrate from the embedded database to an external SQL server database?

Thanks,

Dave

Tags (2)
Reply
0 Kudos
3 Replies
imacari80
Contributor
Contributor

Dave,

Eres tu soporte de vmware?

Tu tienes asignado el caso de soporte que tengo con vmware?

Saludos,

Iver Marino Cardenas Rios

Administrador Windows

VMware Certified Professional 5 – Data Center Virtualization (VCP-DCV)

SUN GEMINI S.A.

•Tel.: 4873030 ext 149

Móvil: 3168338861

•E-mail: iver.cardenas@sungemini.com.co<mailto:iver.cardenas@sungemini.com.co>

De: drharrold

Enviado el: viernes, 14 de junio de 2013 04:26 p.m.

Para: Iver Cardenas

Asunto: New message: "Backup of embedded database"

VMware Communities<http://communities.vmware.com/index.jspa>

Backup of embedded database

created by drharrold<http://communities.vmware.com/people/drharrold> in vSphere Replication - View the full discussion<http://communities.vmware.com/message/2252477#2252477>

Reply
0 Kudos
mvalkanov
VMware Employee
VMware Employee

Hi Dave,

I haven't done it myself, but I guess you could use the pg_dump/pg_dumpall/pg_restore/psql commands from /opt/vmware/vpostgres/1.0/bin/ within the appliance.

Please beware that in addition to VRMS database, there are also an embedded (SQLite) database for VR server, configuration files and key pairs within the appliance.

Backing up only the VRMS database won't help in the event of losing the replication appliance.

You could perform some backup of the whole appliance.

There is no official tool yet for VRMS database migration, but the feature has been requested and might become available in some future release.

Regards,

Martin

Reply
0 Kudos
pshterev
VMware Employee
VMware Employee

Hi Dave,

It is much easier to backup/snapshot the entire VRMS appliance in case you are using embedded DB. This is a preferable way to have a protection over your VRMS configuration. In case you are using external DB you have to make snapshots of the VRMS appliance and the external DB VM. It's a good idea to make those snapshots approximate at the same time.

In case you still want to try to manually backup your VRMS DB you should know that it is not so easy and also it is not supported in any way. Not only embedded VRMS DB should be backed up but also embedded VR DB - located in a file something like /etc/vmware/hbrsrv.xx.db. Also you should back up file /etc/vmware/hbrsrv.uuid.conf and maybe certificates files also. VRMS DB can be dumped with /opt/vmware/vpostgres/1.0/bin/pg_dumpall > /tmp/dbdump -Uvrmsdb .

Restoring VR DB is just a file replacement (you should stop VRMS and VR services before that). Restoring VRMS DB is done by dumping the current one with /opt/vmware/vpostgres/1.0/bin/psql postgres -c "drop database vrmsdb" -Uvrmsdb and importing from backed up file with command : /opt/vmware/vpostgres/1.0/bin/psql -f /tmp/dbdump postgres -Uvrmsdb . In case you have deployed new VRMS appliance and you're trying to configure it from back ups you will have to manually edit data in the DB because the new VRMS appliance VM has a new MOID so the one stored in the DB should be replaced.

Reply
0 Kudos