You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by bryand <br...@bldixon.net> on 2018/03/02 13:18:29 UTC

Broker-j - Restoring BDB Backup

I'm planning on using the broker-j provided
org.apache.qpid.server.store.berkeleydb.BDBBackup class to backup our HA BDB
database.  I want to make sure I understand the restore process.  To restore
the DB for the Virtual Host Node the backup was taken for do we simply:
1. Stop the VirtualHostNode 
2. delete all contents of ${QPID_WORK}/<nodename>/config directory and then
copy the backup logs (produced by the BDBBackup class) to that /config
directory
3. Start the VirtualHostNode





--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Broker-j - Restoring BDB Backup

Posted by Oleksandr Rudyy <or...@gmail.com>.
Hi Bryan,

Backup data is a mean to restore your cluster after all nodes in the
group are lost, for example, when the data centre hosting the cluster
is hit by natural disaster like flood, hurricane, etc.
Even when one node from the group survives you can rebuild your
cluster from it by removing lost nodes and adding new nodes if
required.
Though the probability of loosing all nodes is quite low, you need to
have a strategy to restore your system from backup.
It is up to your business to define how much data can be lost. You can
backup data every 15 minutes if required.
Ideally you would want to backup data on every node as backup utility
is not aware about the state of the group.

Kind Regards,
Alex









On 13 March 2018 at 15:57, bryand <br...@bldixon.net> wrote:
> Thanks for the reply Alex.
>
> I've been working on our production Broker-J backup and recovery solution
> and my plan was to create a little Java app that utilizes the Broker-J
> provided BDBBackup class and perform a hot backup every 15 minutes.  Ideally
> we'd never have to use it but things happen (our production ActiveMQ KahaDB
> got corrupted just last week).  I've been reading through the Berkeley DB
> Java Edition and comments in the BDBBackup class and am wondering if
> performing the hot backup every 15 minutes will cause any issues with how it
> locks files?   Once we migrate all of our ActiveMQ clients over to be
> Broker-J clients we will have a fairly active messaging environment in
> production.
>
> Also, I've been wondering what the first approach of our production recovery
> process should be.  Being that I'm only planning on taking a hot backup
> every 15 minutes if we use those backups then we'll be losing any changes
> made since that last backup.  Would it be best to try to utilize one of the
> replicated databases and the DbResetRepGroup capability you mentioned in
> hopes that corrupted changes hadn't made it to both of the replica databases
> yet?  And then if that doesn't recover the Berkeley DB use our backups as
> more of a last resort since it could result in missing messages?
>
> Just curious on what people have come up with for the production
> backup/recovery approaches.
>
> Thanks
> Bryan
>
>
>
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Broker-j - Restoring BDB Backup

Posted by bryand <br...@bldixon.net>.
Thanks for the reply Alex.

I've been working on our production Broker-J backup and recovery solution
and my plan was to create a little Java app that utilizes the Broker-J
provided BDBBackup class and perform a hot backup every 15 minutes.  Ideally
we'd never have to use it but things happen (our production ActiveMQ KahaDB
got corrupted just last week).  I've been reading through the Berkeley DB
Java Edition and comments in the BDBBackup class and am wondering if
performing the hot backup every 15 minutes will cause any issues with how it
locks files?   Once we migrate all of our ActiveMQ clients over to be
Broker-J clients we will have a fairly active messaging environment in
production.

Also, I've been wondering what the first approach of our production recovery
process should be.  Being that I'm only planning on taking a hot backup
every 15 minutes if we use those backups then we'll be losing any changes
made since that last backup.  Would it be best to try to utilize one of the
replicated databases and the DbResetRepGroup capability you mentioned in
hopes that corrupted changes hadn't made it to both of the replica databases
yet?  And then if that doesn't recover the Berkeley DB use our backups as
more of a last resort since it could result in missing messages?

Just curious on what people have come up with for the production
backup/recovery approaches.

Thanks
Bryan



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Broker-j - Restoring BDB Backup

Posted by Oleksandr Rudyy <or...@gmail.com>.
Hi Brian,

The steps for restoring of BDB virtual host node store are correct.
Though, please be aware that in case of moving node into a different
machine you need to reset the bdb ha group as per [1].

As for BDBBackup utility provided by Qpid,  it works simply by
acquiring locks on je files and copying the files into specified
backup folder.
If load is high and store is changing too frequently, the utility
might fail to acquire locks on all files within the predefined timeout
of 60 seconds.

We have been considering replacing that utility with BDB VHN/VH
management operations  which would call JE
com.sleepycat.je.util.DbBackup underneath.

Thus, you can use com.sleepycat.je.util.DbBackup for backup,  rather
than org.apache.qpid.server.store.berkeleydb.BDBBackup.

Kind Regards,
Alex

[1] http://qpid.apache.org/releases/qpid-broker-j-7.0.1/book/Java-Broker-High-Availability-Reset-Group-Infomational.html


On 2 March 2018 at 13:18, bryand <br...@bldixon.net> wrote:
> I'm planning on using the broker-j provided
> org.apache.qpid.server.store.berkeleydb.BDBBackup class to backup our HA BDB
> database.  I want to make sure I understand the restore process.  To restore
> the DB for the Virtual Host Node the backup was taken for do we simply:
> 1. Stop the VirtualHostNode
> 2. delete all contents of ${QPID_WORK}/<nodename>/config directory and then
> copy the backup logs (produced by the BDBBackup class) to that /config
> directory
> 3. Start the VirtualHostNode
>
>
>
>
>
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org