# Backup Methods

Even though most of the data in Petro.ai is coming from elsewhere in your environment, you will want to have a capturing and backup strategy for the user generated data in the system. For example, this includes Petrons, job configurations, system data, well selections, comments, decline curve analyses, and user settings.

There are two approaches to backing up Petro.ai:

  1. Creating regular snapshots of the virtual machines used to host the Petro.ai server and databases.

  2. Automating a mongodump of the system and then backing up critical files.


While the regular snapshots of the VMs would be the easiest method, we can understand the need to reduce the overhead of failover systems in your environment. For that reason, we'll discuss both methods.

# VM Snapshots

You can create a backup of your Petro.ai deployment by taking regular copies of the system's data files. This copies all the files on the system at the point in time. While some storage systems are able to take point-in-time snapshots while the software is running, we recommend that you shutdown your Mongo cluster and then perform the backup.

To get an accurate snapshot of the Petro.ai, you will want to gracefully shutdown the servers first before performing the snapshot. This gives the Mongo oplog plenty of time to address data currently in transit between the nodes.

# File Backups

In the scenario where you want to take file backups of the system. You will want to first perform the following:

  1. Turn off the Petro.ai server
  2. Log into one of the database servers for Petro.ai
  3. Perform a mongodump of the database to a network location.

For example you can run the following:

mongodump --out=T:/backups/petroaidb.10.10.2019.dmp

See Mongo's Backup and Restore Tools guide for an overview of the functionality.


For further options and specifics on the mongodump commandline feature see the MongoDB Package Components > mongodump page.

  1. The last step will be to copy the server and configuration files. Copy the directory located at C:\Program Files\Petro.ai\ to capture the configuration.