Storage
CloudShark stores capture files, custom user profiles, and
private RSA keys
in the directory /usr/cloudshark/data
.
A common scenario is to mount a remote file system on a CloudShark host, to improve the size, speed, and robustness of the system storage. This article details how to change the default storage directory.
Updating the Directory
Do not adjust the directory location by manually editing the
cloudshark.conf
file. This is not supported.
In this example we will use /mnt/data
as an external storage location that
has been mounted.
1. Stop CloudShark
To ensure no new files are uploaded while updating the storage directory, stop CloudShark by running:
systemctl stop cloudshark-full
2. Set Owner
Grant ownership of the new directory to the cloudshark
user and group:
chown cloudshark.cloudshark /mnt/data
3. Create Link
You must create a symbolic link for theĀ /usr/cloudshark/data
directory to
point to your new storage directory. To rename the existing storage directory
and create the symbolic link run:
mv /usr/cloudshark/data /usr/cloudshark/data.original
ln -s /mnt/data /usr/cloudshark/data
4. Copy Files
Copy all of the existing files from the original storage location to the new location:
cp -r /usr/cloudshark/data.original/* /mnt/data
5. Start CloudShark
Once the files from the original storage location have been copied, CloudShark can be started by running:
systemctl start cloudshark-full