Persistent storage
  • 24 Jul 2020
  • 1 Minute To Read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Persistent storage

  • Print
  • Share
  • Dark
    Light

When you deploy your code, the cache and all changes made to the previous version will be erased. This is necessary to make sure nothing hinders the build and everything is consistent.

Permanent storage provides you with a safe place where you can store your data, such as images or documents that users upload. This works perfectly until you need to scale your service, at which point you will need to switch to a DFS (distributed file system), such as GridFS on MongoDB.

Permanent storage is also used as storage for databases.

Mount point

Select Storage from the menu to access the permanent storage settings. You'll see your permanent storage usage and its mount point. This is the directory your storage is linked to.

Screen Shot 2020-06-18 at 2.49.03 PM.png

Your code is located in the /opt/build directory, so if you want to use a relative path in your code you can mount it to a directory like /opt/build/storage.

Backup

We back up your storage every day, so you can be sure your data won't be lost if something goes wrong.

Screen Shot 2020-06-18 at 3.15.51 PM.png

Choose the snapshot you want to restore and click Restore.

Was This Article Helpful?