Configuration Guide: storage.json


What is the purpose of the storage.json file?

The storage.json file is the configuration file for your backup storage. In certain unusual cases, you may need to manually modify this file. For example, if you wish to move the “data index” to a new SSD or update CubeBackup when a new IP address has been assigned to your storage device.

NOTE: If you simply want to move the backup data to a new place, there is no need to manually edit the storage.json file. Please use the cbackup migration command instead. For detailed instructions and examples on data migration, please refer to How to migrate G Suite backup data to a new location?

Where is the storage.json file?

The storage.json file is located in the <CubeBackup installation directory>/db folder.

On Windows, the file is stored in the “C:\Program Files\CubeBackup4\db\” directory by default.
On Linux, the file is stored in the “/opt/cubebackup/db” directory by default.

Fields in the storage.json file

storage.json sample

{
  "EncryptEnabled": true,
  "Type": "LOCAL",
  "IndexPath": "/opt/cubebackup/index",
  "DataPath": "/var/cubebackup_data",
  "S3Endpoint": "",
  "S3Bucket": "",
  "S3Region": "",
  "S3AccessKeyId": "",
  "S3SecretAccessKey": "",
  "WinsLocation": "",
  "WinsUsername": "",
  "WinsPassword": ""
}

Explanation and possible values of each field:

  • EncryptEnabled: Whether or not the backup data should be encrypted.

true: Encrypt the backup data.
false: Do not encrypt the backup data.

  • Type: The storage type.

“LOCAL”: Local disk
“WINS”: Windows network location
“NAS”: Mounted network storage
“S3”: Amazon S3
“S3C”: Amazon S3 compatible storage

  • IndexPath: The storage location for the “data index”.

The data index should be stored on a local disk (local SSD is strongly recommended).
On Windows, double backslashes should be used to separate the directories in the path. For example:

  "IndexPath": "C:\\Program Files\\CubeBackup4\\index"
  • DataPath: The location for the backup data if backups are stored on a local disk or a mounted network storage.

If backups are stored on cloud storage (“S3” or “S3C”) or a Windows network location (“WINS”), this field is ignored.
On Windows, double backslashes should be used to separate the directories in the path. For example:

  "DataPath": "D:\\backups\\gsuite_data"
  • S3Endpoint, S3Bucket, S3Region, S3AccessKeyId, S3SecretAccessKey: These fields represent the configuration for AWS S3 storage or AWS S3 compatible storage. These settings are only valid when Type is “S3” or “S3C”.

  • WinsLocation, WinsUsername, WinsPassword: These fields represent the configuration for network storage on Windows. These settings are only valid when Type is “WINS”.

    • WinsLocation: The network storage path on Windows. Double backslashes should be used to separate the directories in the path. For example:

      "WinsLocation": "\\\\BACKUPNAS\\homes\\gsuitebackups"
      
    • WinsUsername, WinsPassword: The username and password to access the network location on Windows. For example:

      "WinsUsername": "BACKUPNAS\\cube",
      "WinsPassword": "cb+12345"
      

EXAMPLES

Here are a few storage.json examples.

Example 1

OS: Linux
Backup to: Local disk

{
  "EncryptEnabled": true,
  "Type": "LOCAL",
  "IndexPath": "/opt/cubebackup/index",
  "DataPath": "/var/cubebackup_data",
  "S3Endpoint": "",
  "S3Bucket": "",
  "S3Region": "",
  "S3AccessKeyId": "",
  "S3SecretAccessKey": "",
  "WinsLocation": "",
  "WinsUsername": "",
  "WinsPassword": ""
}

Example 2

OS: Linux
Backup to: Mounted NAS

{
  "EncryptEnabled": true,
  "Type": "NAS",
  "IndexPath": "/opt/cubebackup/index",
  "DataPath": "/mnt/nas",
  "S3Endpoint": "",
  "S3Bucket": "",
  "S3Region": "",
  "S3AccessKeyId": "",
  "S3SecretAccessKey": "",
  "WinsLocation": "",
  "WinsUsername": "",
  "WinsPassword": ""
}

Example 3

OS: Linux
Backup to: AWS S3

{
  "EncryptEnabled": true,
  "Type": "S3",
  "IndexPath": "/opt/cubebackup/index",
  "DataPath": "",
  "S3Endpoint": "",
  "S3Bucket": "cubebackup-beta-ubuntu",
  "S3Region": "us-east-1",
  "S3AccessKeyId": "AKIAWNOURNO6U4YZEYUY",
  "S3SecretAccessKey": "gCA0U4JG17iNMSd9f0YlskgATQ99Y5L+DbvpgiDX",
  "WinsLocation": "",
  "WinsUsername": "",
  "WinsPassword": ""
}

Example 4

OS: Windows
Backup to: Local disk

{
  "EncryptEnabled": false,
  "Type": "LOCAL",
  "IndexPath": "C:\\Program Files\\CubeBackup4\\index",
  "DataPath": "C:\\cubebackup_data",
  "S3Endpoint": "",
  "S3Bucket": "",
  "S3Region": "",
  "S3AccessKeyId": "",
  "S3SecretAccessKey": "",
  "WinsLocation": "",
  "WinsUsername": "",
  "WinsPassword": ""
}

Example 5

OS: Windows
Backup to: NAS

{
  "EncryptEnabled": true,
  "Type": "WINS",
  "IndexPath": "C:\\Program Files\\CubeBackup4\\index",
  "DataPath": "",
  "S3Endpoint": "",
  "S3Bucket": "",
  "S3Region": "",
  "S3AccessKeyId": "",
  "S3SecretAccessKey": "",
  "WinsLocation": "\\\\CUBENAS\\homes\\gsuitedata",
  "WinsUsername": "CUBENAS\\cube",
  "WinsPassword": "cb+12345"
}