Veritas NetBackup™ for MongoDB Administrator's Guide
- Overview of protecting MongoDB using NetBackup
- Verify the pre-requisites for the MongoDB plug-in for NetBackup
- Configuring NetBackup for MongoDB
- Configuring backup options for MongoDB using the mongodb.conf file
- Adding MongoDB credentials in NetBackup
- Managing backup hosts
- Backing up MongoDB using NetBackup
- Backing up MongoDB data
- Configuring NetBackup policies for MongoDB plug-in
- Restoring or recovering MongoDB data using NetBackup
- About the restore scenarios for MongoDB database from the BAR interface
- Recovering a MongoDB database using the command line
- Troubleshooting
- Appendix A. Additional information
Using NetBackup Command Line Interface (CLI) to create a BigData policy for MongoDB clusters
You can also use the CLI method to create a BigData policy for MongoDB.
For more information about the commands, refer to the NetBackup Commands Reference Guide.
To create a BigData policy using NetBackup CLI method
- Log on as an Administrator.
- Navigate to
/usr/openv/netbackup/bin/admincmd
on UNIX orinstall_path\NetBackup\bin\admincmd\
on Windows. - Create a new BigData policy using the default settings.
bppolicynew policyname
- View the details about the new policy using the
-L
option.bpplinfo policyname -L
- Modify and update the policy type as BigData.
bpplinfo PolicyName -modify -v -M MasterServerName -pt BigData
- Specify the Application_Type as MongoDB.
bpplinclude PolicyName -add "Application_Type=mongodb"
Note:
The parameter values for Application_Type=mongodb are case-sensitive.
- Specify the backup host on which you want the backup operations to be performed for MongoDB.
bpplinclude PolicyName -add "Backup_Host=IP_address or hostname"
Note:
The backup host must have a Linux operating system. The backup host can be a NetBackup client or a media server or a master server.
- Specify the MongoDB directory or folder name that you want to backup.
bpplinclude PolicyName -add "ALL_DATABASES"
- Modify and update the policy storage type for BigData policy.
bpplinfo PolicyName -residence STUName -modify
- Specify the host name based on your MongoDB setup as follows:
Sharded MongoDB cluster
The client name as seen in the MongoDB shell and the mongod port number of the primary configuration server in the following format:
MongoDBNode-portnumber
Replica set MongoDB cluster
The client name as seen in the MongoDB shell and the mongod port number of the primary node of the replica set in the following format:
MongoDBNode-portnumber
Standalone MongoDB setup
The client name as seen in the MongoDB shell and the mongod port number of the standalone node in the following format:
MongoDBNode-portnumber
bpplclients PolicyName -M "MasterServerName" -add "MongoDB_configserver" "Linux" "RedHat"
Warning:
Do not enter the node that acts an Arbiter node for MongoDB.
- Assign a schedule for the created BigData policy as per your requirements.
bpplsched PolicyName -add Schedule_Name -cal 0 -rl 0 -st sched_type -window 0 0
Here,
sched_type
value can be specified as follows:Schedule Type
Description
FULL
Full backup
INCR
Differential Incremental backup
The default value for
sched_type
is FULL.Once you set the schedule, MongoDB data is backed up automatically as per the set schedule without any further user intervention.
- Alternatively, you can also perform a manual backup for MongoDB data.
For performing a manual backup operation, execute all the steps from Step 1 to Step 11.
- For a manual backup operation, navigate to
/usr/openv/netbackup/bin
Initiate a manual backup operation for an existing BigData policy using the following command:
bpbackup -i -p PolicyName -s Schedule_Name -S MasterServerName -t 44
Here,
-p
refers to policy,-s
refers to schedule,-S
refers to master server, and-t 44
refers to BigData policy type.