Este conteúdo não está disponível no idioma selecionado.
Chapter 8. Backing Up and Restoring Data Grid Clusters
Create archives of Data Grid resources that include cached entries, cache configurations, Protobuf schemas, and server scripts. You can then use the backup archives to restore Data Grid Server clusters after a restart or migration.
Prerequisites
- Start the Data Grid CLI.
- Connect to a running Data Grid cluster.
8.1. Backing Up Data Grid Clusters Copiar o linkLink copiado para a área de transferência!
Create backup archives in .zip format that you can download or store on Data Grid Server.
Prerequisites
Backup archives should reflect the most recent cluster state. For this reason you should ensure the cluster is no longer accepting write requests before you create backup archives.
Procedure
- Create a CLI connection to Data Grid.
Run the
backup createcommand with the appropriate options, for example:Back up all resources with an automatically generated name.
[//containers/default]> backup create
[//containers/default]> backup createCopy to Clipboard Copied! Toggle word wrap Toggle overflow Back up all resources in a backup archive named
example-backup.[//containers/default]> backup create -n example-backup
[//containers/default]> backup create -n example-backupCopy to Clipboard Copied! Toggle word wrap Toggle overflow Back up all resources to the
/some/server/dirpath on the server.[//containers/default]> backup create -d /some/server/dir
[//containers/default]> backup create -d /some/server/dirCopy to Clipboard Copied! Toggle word wrap Toggle overflow Back up only caches and cache templates.
[//containers/default]> backup create --caches=* --templates=*
[//containers/default]> backup create --caches=* --templates=*Copy to Clipboard Copied! Toggle word wrap Toggle overflow Back up named Protobuf schemas only.
[//containers/default]> backup create --proto-schemas=schema1,schema2
[//containers/default]> backup create --proto-schemas=schema1,schema2Copy to Clipboard Copied! Toggle word wrap Toggle overflow
List available backup archives on the server.
[//containers/default]> backup ls
[//containers/default]> backup lsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Download the
example-backuparchive from the server.If the backup operation is still in progress, the command waits for it to complete.
[//containers/default]> backup get example-backup
[//containers/default]> backup get example-backupCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optionally delete the
example-backuparchive from the server.[//containers/default]> backup delete example-backup
[//containers/default]> backup delete example-backupCopy to Clipboard Copied! Toggle word wrap Toggle overflow
8.2. Restoring Data Grid Clusters from Backup Archives Copiar o linkLink copiado para a área de transferência!
Apply the content of backup archives to Data Grid clusters to restore them to the backed up state.
Prerequisites
- Create a backup archive that is either local to the Data Grid CLI or stored on Data Grid Server.
- Ensure that the target container matches the container name in the backup archive. You cannot restore backups if the container names do not match.
Procedure
- Create a CLI connection to Data Grid.
Run the
backup restorecommand with the appropriate options.Restore all content from a backup archive accessible on the server.
[//containers/default]> backup restore /some/path/on/the/server
[//containers/default]> backup restore /some/path/on/the/serverCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restore all content from a local backup archive.
[//containers/default]> backup restore -u /some/local/path
[//containers/default]> backup restore -u /some/local/pathCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restore only cache content from a backup archive on the server.
[//containers/default]> backup restore /some/path/on/the/server --caches=*
[//containers/default]> backup restore /some/path/on/the/server --caches=*Copy to Clipboard Copied! Toggle word wrap Toggle overflow