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

15.3. Restoring from an Application Snapshot


Restoring from an application snapshot restores the Git repository, the application data directories, and the log files found in the specified archive. When the restoration is complete, the deployment script is run on the restored repository as though git push was run.

Warning

The rhc snapshot restore command overwrites the remote Git repository. Therefore, any changes made since taking the snapshot are lost. Importing snapshot data into a local environment can delete local content, for example a user table in a database. If you are unsure of the effect a snapshot import could have on local data, use SSH to access an application and create the backup directly.
Restore an application from an application snapshot with the following command, specifying the name of the application:
$ rhc snapshot restore App_Namerhc snapshot restore App_Name
Copy to Clipboard Toggle word wrap

Example 15.3. Restoring from an Application Snapshot

$ rhc snapshot restore myapp
Restoring from snapshot myapp.tar.gz...
Removing old git repo: ~/git/myapp.git/
Removing old data dir: ~/app-root/data/*
Restoring ~/git/App_Name.git and ~/app-root/data
Activation status: success

RESULT:
Success
Copy to Clipboard Toggle word wrap
If the override process was used to save an application under a different filename, as described in Section 15.2, “Creating an Application Snapshot”, you can restore this snapshot version of an application with the following command:
$ rhc snapshot restore App_Name --filepath Renamed_Apprhc snapshot restore App_Name --filepath Renamed_Apprhc snapshot restore App_Name --filepath Renamed_Apprhc snapshot restore App_Name --filepath Renamed_App
Copy to Clipboard Toggle word wrap
where App_Name is the name of the application, and Renamed_App is the file path where it was saved.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat