Skip to content

Using Volumes

Volumes are a feature designed to allow you to share data between Containers. This also allows you to store data outside of your application folder, share data between Containers, or provide users with access to specific files.

Managing Volumes in the Webslice Console

The Volumes screen is where you can:

  • See all your current Volumes.
  • Create Volumes.
  • Manage connections between Volumes and Containers.
  • Delete Volumes.

Before You Delete a Volume

You cannot delete a Volume if it attached to any continaers. You will need to manually disconnecting it first.

Once there are no attached Containers, you can delete the Volume.

Connecting to a Volume via SSH/SFTP

There are two ways to connect to a Volume, both of which are done via SSH and SFTP. You might need to link an SSH user to a Container or Volume before you go on.

Connecting via a Container

  1. SSH into the server.
  2. Navigate into the relevant container folder.
  3. Enter the volumes folder and find your Volume.

Connecting directly to a Volume

  1. SSH into the server.
  2. Navigate to the volumes folder.

Using a Volume in a Container

Each Volume exists as extra directory in your Container. By default, it is not set up to serve files on your Container.

To allow your website to use files from within the Volume, make a symbolic link inside the Container:

  1. SSH into your Container.
  2. Navigate to the directory where you want your Volume to live.
  3. Create a symlink via the command ln -s /container/volumes/[volume-name] [directory name]

For example, if you wished to serve videos on example.com/assets/videos, which are stored on a Volume called assets under the videos folder, you would run:

cd /container/application/public
ln -s /container/volumes/assets

This will create a symlink from /container/application/public/assets to /container/volumes/assets, allowing you to serve any files in that Volumes on your site.

To only serve the videos within the assets Volume, you would run:

cd /container/application/public
ln -s /container/volumes/assets/videos videos

Accessing Volume Backups

Volume backups are done daily, just like your Containers. Our automatic systems will backup your files and store them in a secure, offsite location.

When you SSH into a Volume, or a Container with a Volume attached to it, you’ll be able to find the backups in the backups folder.

  • If your SSH user is connected to a Volume, this folder will be located in the root directory, alongside the volumes folder.
  • If your SSH user is connected a Container, this folder will be located in the Container’s files. Navigate into the volumes subdirectory under backups to find the backups for each Volume.

If there is no backups folder, then there are no backups of the Volume.