此内容没有您所选择的语言版本。

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.gz files, which contain the application and all local files, including log files.

Important

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/
Copy to Clipboard Toggle word wrap
The contents of the repo directory are the files that make up the application source code. The contents of the build-dependencies and dependencies directories are cartridge-specific, and are determined by the contents of the managed_files.yml file.

The following information on the managed_files.yml file dictates the construction of the snapshot:
  • If an entry under dependency_dirs starts with ~/, then a new folder will be created in the dependencies directory.
  • If an entry under dependency_dirs does not start with ~/, then a directory will be created in the dependencies/Cartridge_Name directory.
  • If an entry under dependency_dirs has the format key: Value, then Value will be the directory name for the previous rules.

Example 15.1. A Sample Node.js managed_files.yml File

The following is an excerpt from the managed_files.yml file on a Node.js cartridge:
dependency_dirs:
- ~/.npm
- node_modules
- ~/.node_modules: node_modules
Copy to Clipboard Toggle word wrap
Using the above rules, this means that the .npm file will be in the dependencies directory, and the node_modules file will be in the cartridge dependencies directory dependencies/nodejs directory:
.npm
nodejs/node_modules
Copy to Clipboard Toggle word wrap
These same rules apply to the information under build_dependencies in the managed_files.yml file, though the build_dependencies file is mainly used in JBoss cartridges.
This information can be used to prepare your own managed_files.yml file for deployment. See Section 13.1, “Introduction to Deployment” for information on deployment, and Section 13.3.2.4, “Deploying from a Snapshot” for information on deploying from a binary snapshot file.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat