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
- SSH into the server.
- Navigate into the relevant
container
folder. - Enter the
volumes
folder and find your Volume.
Connecting directly to a Volume
- SSH into the server.
- 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:
- SSH into your Container.
- Navigate to the directory where you want your Volume to live.
- 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:
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:
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 underbackups
to find the backups for each Volume.
If there is no backups
folder, then there are no backups of the Volume.