Chapter 15. Application Backup and Restoration with Snapshots
15.1. Introduction to Snapshots
Application snapshots are used to back up and restore applications. Snapshots are stored in
tar.gzfiles, which contain the application and all local files, including log files.
Application backups and user data are not stored on OpenShift Enterprise servers. These files are only stored on the local system.
Binary Deployment File Structure
A binary deployment file is a snapshot of an application used for deployment without using Git. Each snapshot has the same top-level structure:
build-dependencies/ dependencies/ repo/The contents of the
repodirectory are the files that make up the application source code. The contents of the
dependenciesdirectories are cartridge-specific, and are determined by the contents of the
The following information on the
managed_files.ymlfile dictates the construction of the snapshot:
- If an entry under dependency_dirs starts with ~/, then a new folder will be created in the
- If an entry under dependency_dirs does not start with ~/, then a directory will be created in the
- If an entry under dependency_dirs has the format
key: Value, then
Valuewill be the directory name for the previous rules.
Example 15.1. A Sample Node.js
The following is an excerpt from the
managed_files.ymlfile on a Node.js cartridge:
dependency_dirs: - ~/.npm - node_modules - ~/.node_modules: node_modules
Using the above rules, this means that the
.npmfile will be in the
dependenciesdirectory, and the
node_modulesfile will be in the cartridge dependencies directory
These same rules apply to the information under
managed_files.ymlfile, though the
build_dependenciesfile is mainly used in JBoss cartridges.
This information can be used to prepare your own
managed_files.ymlfile for deployment. See Section 13.1, “Introduction to Deployment” for information on deployment, and Section 18.104.22.168, “Deploying from a Snapshot” for information on deploying from a binary snapshot file.