Open topic with navigation
The NuoDB peer-to-peer network of brokers manages domain runtime and configuration state in a durable domain configuration. Information stored here includes:
You should periodically back up this information in case of a catastrophic failure that requires you to rebuild the domain. You can also use this information to recover from some accidental changes to the domain, such as replacing a user account that was accidentally deleted.
A NuoDB domain with at least one broker running.
Note: Examples of NuoDB Manager command lines assume that a
nuodbmgr properties file is in place. Instructions for creating this file are in Setting Up Domain Administration.
Typically, you set up domain backup as a
cron task that runs at a frequency that you specify. How frequently you run this task depends on how frequently you modify the domain configuration.
NuoDB recommends that you back up the domain configuration once a day. Determine whether this backup is different from the previous backup. If it is then push the newer backup to your repository. If you have a version control system (such as git) to manage your repository you can use that for determining deltas and then push your latest backup there.
Follow these steps to back up the durable domain configuration:
Invoke the NuoDB Manager capture domainConfiguration command. In the following example, the backup will be in the domain.cap file.
nuodbmgr --command “capture domainConfiguration overwrite true file domain.cap”
Copy the capture file to your NuoDB artifacts repository. For example:
scp domain.cap nas1:nuodb-setup/raft-backup/domain.cap
Alternatively, if you have network access to your domain from the host that your repository is stored on then you can run NuoDB Manager directly from that host. In this case, you do not need to invoke
scp to copy your file and you can replace steps A and B with something like the following command:
nuodbmgr --command “capture domainConfiguration overwrite true file /home/developer/nuodb-setup/raft-backup/domain.cap”
Use your favorite tool to determine if there are any differences between the newest backup and the previous backup. If there are no differences then you can delete the newest backup and stop here.
If there are updates in the newest backup, save the changes. For example:
git add raft-backup/domain.capnas1$
git commit -m “backup of raft changes at $(date)”
A copy of the latest domain configuration is now stored in a repository as a backup for domain configuration corruption or accidental changes.