How to move the data index to another location.
What is the data index?
The data index in CubeBackup acts as a cache to speed up the backup process. It contains a part of the metadata for your backup, including SQLite database files, configuration files, and other information used in the backup process. For more information about the data index, please refer to What is the data index and why is it needed?
In some scenarios, you may need to move the data index to a new place. For example:
The partition where the data index is stored is nearly full. You need to move the data index to a larger partition.
If you run out of space on your CubeBackup EC2 instance - perhaps because the data index has grown beyond your initial parameters - it is easy to extend the volume size without detaching the volume or migrating the data index. For detailed instructions, you can follow the steps in Method 2.
In the initial configuration, you placed the data index on an HDD or network storage, which slows down your backups. Now you decided to move the data index to an SSD.
Fortunately, CubeBackup offers a simple method to move the data index to a new location:
Method 1: Regenerate the data index in a new directory.
In the CubeBackup web console, stop the current backup job if one is running.
On the OVERVIEW page of the CubeBackup web console, find the Storage status section at the bottom right, and click the gear icon to open the update wizard. Press the Edit storage configuration button.
As a safety precaution, an authentication code will be emailed to you. Please type in the code to continue.
Enter the new storage path for the data index, and click Save. CubeBackup will run a storage writing test to confirm that the new directory is valid before saving the changes and automatically regenerating the data index in it.
Return to Dashboard. Now you can initiate a backup to confirm that the new data index is functioning properly.
Method 2: Extend the volume size on an EC2 instance
For an EC2 instance, please follow the instructions below to extend the partition size of your EC2 instance:
- First extend the volume size in AWS console:
- In the CubeBackup console, click Stop backup to if there is a current backup process.
- Login to your AWS console and then select the EC2 instance on which CubeBackup is running.
- In the Storage tab, click the Volume ID -> Actions -> Modify Volume and resize the volume to a larger size.
Then you need to extend the partition itself:
- SSH to the EC2 instance.
Type the following command to list the block devices:
You should see something similar to the example below. The size of the root volume reflects the resized space (20GB) and the size of the partition reflects the original size (8GB), which must be extended before you can extend the file system.
To do so, type the following command:
sudo growpart /dev/xvda 1
Carefully note that there is a space between the device name and partition number.
You can use the lsblk command again to check that the partition reflects the increased volume size.
Last but not least, you need to extend the filesystem itself:
Use the following command for ext2,ext3 or ext4 file systems:
sudo resize2fs /dev/xvda1
For an XFS file system, use the command below:
sudo xfs_growfs /dev/xvda1
You can check the extended filesystem with:
If everything goes smoothly, you will see that the partition size has changed in the CubeBackup web console.