Table of contents

MongoDB backup via BVQ Server

MongoDB Backups and Exports can now be taken using the BVQ Sever Web UI which has multiple advantages over Mongo CLI:

  • It eases backup and data export handling
  • Backup tasks can be sheduled
  • A timeframe can be specified for performance data so there is no need to take a full backup (File size much smaller and easier to send to your support partner)

MongoDB backup via Mongo CLI

 Watch the video about database backup...

  1. Open a CMD and navigate to the following directory:

    cd C:\Program Files\SVA\BVQ\bvq-mongodb\bin  or
    cd D:\Program Files\SVA\BVQ\bvq-mongodb\bin

    This is the default location of the MongoDB installation. This is also the location of the mongodump.exe which will be used to create the DB backup

  2. Execute the following command
    <bvquser> the BVQ user
    <bvquser password> the BVQ user password
    <bvq db> the name of the database (dbname)
    <backup path> where you want to store the backup
    mongodump --authenticationDatabase admin -u <bvquser> -p <bvquser password> -d <bvq db> --gzip --out=<backup path>

    This performs the backup of the database and store all data of the database in a directory you can find here <backup path>\dbname

     Backup command syntax ...

    ### Syntax of the backup command is:

    mongodump --authenticationDatabase admin -u <bvquser> -p <bvquser password> -d <bvq db> --gzip --out=<backup path>

    All Object in <BLUE> need to be adjusted based on your local installation and given BVQ USER/PASSWORD and the name of the MongoDB.

    ### E.g.:

    mongodump --authenticationDatabase admin -u bvq -p P@ssw0rd -d bvq --gzip --out=D:\backup

     A successful backup should have the following folder structure and is located under the folder you specified in the command <backup path>

    ### Folder structure

    D: |- backup

         |- bvq

           |- disk_array.bson.gz

           |- host.bson.gz

           |- node_hist.bson.gz

           |- perf_vdisk_agg.bson.gz

  3. Zip the directory <backup path>\dbname
    Use Zip or 7zip to create one file out of the backup directory.
    Never send single files, the complete directory is needed.