Este conteúdo não está disponível no idioma selecionado.

10.2. Restore


When an application developer runs the rhc snapshot restore command, OpenShift Enterprise restores the application from an archive in the following steps:
  1. Prepares the application for restoration.
    • If the archive contains a Git repository, OpenShift Enterprise runs the gear pre-receive command.
    • If the archive does not contain a Git repository, OpenShift Enterprise runs the gear stop command.
  2. Runs the control pre-restore command for each cartridge on the gear. This enables you to control the restoration of your cartridge, for example by deleting an old database dump.
  3. Builds a list of file name changes to apply during the restoration from the restore_transforms entry in the $cartridge_name/metadata/managed_files.yml file for each cartridge on the gear.
  4. Extracts the archive into the gear user's home directory, overwriting existing files and applying the file name changes listed in the restore_transforms entry in the managed_files.yml file.
  5. Runs the control post-restore command for each cartridge on the gear. Use this script to load a database flat file into the running database.
  6. Resumes the application.
    • If the archive contains a Git repository, OpenShift Enterprise runs the gear postreceive command.
    • If the archive does not contain a Git repository, OpenShift Enterprise runs the gear start command.
  7. Will either stop or start the gear based on the state of the application before restoring.
Restoring with Transformed File Names

Use the optional restore_transforms entry in the $cartridge_name/metadata/managed_files.yml file to provide scripts that transform file names when OpenShift Enterprise restores an application. This entry enables you to restore older snapshots to a newer cartridge with file name changes.

Example 10.2. restore_transforms Entry

restore_transforms:
- s|${OPENSHIFT_GEAR_NAME}/data|app-root/data|
Copy to Clipboard Toggle word wrap
OpenShift Enterprise uses the tar command when restoring a gear. See the tar man page --transform option for more information.
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat