Search

15.3. Restoring from an Application Snapshot

download PDF
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_Name

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
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_App
where App_Name is the name of the application, and Renamed_App is the file path where it was saved.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.