Restore Dremio
This page describes how to restore Dremio using an admin CLI command and other general information about restoring Dremio from a backup.
-
Dremio metadata (view definitions, source settings, spaces, RBAC, local user accounts) and user uploaded files can be backed up and restored.
-
The restore CLI command does not restore Apache Iceberg metadata stored in distributed storage.
-
Performing a restore does not restore the contents of the distributed cache, such as acceleration cache, downloaded files, and query results.
Restoring with the Admin CLI
This section provides details about restoring Dremio using the dremio-admin restore
CLI command.
Requirements
-
Ensure that the
dremio
service is shut down on all nodes of your Dremio cluster. See Startup/Shutdown for more information. -
The
restore
command must be run on the master node.cautionA backup can only be restored using the same version of Dremio that the backup was created on.
Syntax
Syntax for restore command<dremio_home>/bin/dremio-admin restore -d <BACKUP_PATH> [additional options]
Options
To obtain a list of restore options on the command line:
Get options for restore command./bin/dremio-admin restore -h
* -d, --backupdir
backup directory path. for example, /mnt/dremio/backups or
hdfs://$namenode:8020/dremio/backups
-h, --help
show usage
-r, --restore
restore dremio metadata (deprecated, always true)
Default: false
-v, --verify
verify backup contents (deprecated, noop)
Default: false
Example
Restore from a backup./bin/dremio-admin restore -d /tmp/dremio_backup_05august/dremio_backup_2022-08-05_13.41
Restoring a Dremio backup step-by-step
The following are step-by-step instructions for restoring Dremio from a backup.
-
Ensure that the
dremio
service is shut down on all nodes of your Dremio cluster. See Startup/Shutdown for more information. -
On the master node, create a copy of
<DREMIO_LOCAL_DATA_PATH>
. Check the default location for your deployment model. -
Prepare
<DREMIO_LOCAL_DATA_PATH>
.-
If you are restoring Dremio in-place (in other words, backing up and restoring within the same Dremio instance):
a. If you want to keep your original data, make a copy of
<DREMIO_LOCAL_DATA_PATH>
with a different name.b. Create an empty directory under
<DREMIO_LOCAL_DATA_PATH>
nameddb
that is readable and writable by the user running restore and by the Dremio daemon.
cautionSecret decryption relies on the contents of the
security
folder. If you delete thesecurity
folder (for in-place restore), source connection will fail during Dremio startup. -
-
Run the following command located in
Run restore command<DREMIO_HOME>/bin/
../dremio-admin restore -d <BACKUP_FOLDER_PATH>
-
Look for the confirmation message. For example:
Example confirmation message...
Restored from backup at /tmp/dremio_backup_2017-02-23_18.25, dremio tables 14, uploaded files 1
If you enabled unlimited splits before creating a backup, and the backup stored metadata about your tables in distributed storage, you must fix sources after restoring the backup through one of the following ways:
-
Forget and refresh the metadata by running SQL for each table. Learn about the SQL commands in Managing Tables.
-
Copy the
/metadata
folder to the new cluster. Learn more about it in Relocating Distributed Storage and Metadata.
Troubleshooting
Enable verbose logging
If you encounter any error messages during restore, enable verbose logging by following the instructions in the "Log Directory" section of the "Admin CLI" topic and run the command again.
Dremio on Edge Nodes
Problem
When Dremio is running on a edge node (Hadoop client installed) and a dremio-admin restore
is performed,
by default, it looks at HDFS and comes back with file does not exist. The folder/file obviously does not exist is Hadoop.
Restore fails with the following stack:
Restore failure outputError Message: java.io.FileNotFoundException: File /tmp/dremiobackup does not exist.
at org.apache.hadoop.hdfs.DistributedFileSystem.listStatusInternal(DistributedFileSystem.java:901)
at org.apache.hadoop.hdfs.DistributedFileSystem.access$600(DistributedFileSystem.java:112)
at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:961)
at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:958)
at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
at org.apache.hadoop.hdfs.DistributedFileSystem.listStatus(DistributedFileSystem.java:958)
at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1537)
at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1580)
at com.dremio.dac.util.BackupRestoreUtil.scanInfoFiles(BackupRestoreUtil.java:191)
at com.dremio.dac.util.BackupRestoreUtil.validateBackupDir(BackupRestoreUtil.java:230)
at com.dremio.dac.cmd.Restore.main(Restore.java:81)
verify failed java.io.FileNotFoundException: File /tmp/dremiobackup does not exist
Workaround
Use file:///
to direct to local. For example, use the following command instead:
./bin/dremio-admin restore -d file:///tmp/dremiobackup/dremio_backup_2019-04-22_20.30
For More Information
- Creating a Backup for getting started with backups.