Persistent storage adds a storage volume that retains data even if the application is restarted or redeployed. When you deploy an application at Kinsta with persistent storage, your application’s pod is connected to the persistent storage volume. If you redeploy the application, the application pod is rebuilt, but the storage volume remains untouched and is reconnected to the application pod once the deployment is complete.
With persistent storage, web and background processes are limited to one instance. You cannot add persistent storage to a cron job. There is no horizontal scaling for web or background processes, but you can vertically scale them by increasing the pod size for the process.
Add an Application With Persistent Storage
In the Resources step when adding an application, you can add persistent storage to your web process, a background process, or both. Under the Pod size field, click Disk to expand this section and complete the following to add persistent storage to your application’s process:
- Mount path: Specify the location of the files to be added to persistent storage (e.g. /var/lib/data). This cannot be the root directory or the directory of any configuration files. The full list of invalid mount paths is shown below.
- Size: Choose the disk size for your persistent storage volume. You can increase the disk size at any time (on the application’s Disks page), but you cannot downgrade the disk size once it has been created.
Continue with the remaining steps of adding an application. When you reach the payment step, you’ll see a separate line item for your persistent storage disk. (If you add persistent storage to multiple processes, you’ll see a separate disk line item for each process.)
Invalid Mount Paths
The following mount paths are invalid because mounting data in these paths may cause issues in an application:
View and Edit Persistent Storage Settings
To view disk usage and edit persistent storage settings, go to Applications > appname > Disks. If your disk usage is below 1 MB, the usage will be shown as 0 usage.
To change the mount path or increase the disk size, under Actions, click the edit (pencil) icon for the disk you want to change.
You can increase the size of the disk, but you cannot downgrade the disk size. If you need less disk space for persistent storage, you’ll need to create a new application with the desired disk size.
Accessing Persistent Storage
To access and view files in persistent storage outside of your application, you can use the Application Web Terminal. If you use a Dockerfile to create your application, make sure Bash is installed in the container and is configured to access the Mount path.
We provide daily backups for Persistent Storage that are stored for 7 days and can be restored by request. When a backup is restored, all data in persistent storage will be rolled back to the time the backup was created.
To request a backup restoration, open a new chat with our Support team and ask for your persistent storage to be restored. Be sure to include your application’s name and persistent storage mount path in your request.
Only users with access to create an application can request a persistent storage backup to be restored. This means that you need to be the owner or company administrator in order to request a backup restoration.
Available Disk Sizes and Pricing
Persistent storage is available for an additional monthly fee, computed at $0.363/GB per month. You can choose from the following disk sizes:
- Add an Application
- Scale Application Resources
- Application Web Terminal
- Configuring Dockerfile Deployments