There is no in-built feature in Kudu to support backup. But, backup/ restore can be made using Spark Job. Spark Job supports both full and incremental table data.
You can use the KuduBackup Spark job to backup one or more Kudu tables.
Common flags/ options that you can use while taking a backup:
--rootPath: The root path is used to output backup data. It accepts any Spark-compatible path.
--kuduMasterAddresses: Is used to specify comma-separated addresses of Kudu masters.
<table>…: Used to indicate a list of tables that you want to back up.
Example - below will take backup of table1 & table2
spark-submit \
--class org.apache.kudu.backup.KuduBackup \
kudu-backup2_2.11-1.10.0.jar \
--kuduMasterAddresses master1-host \
--rootPath hdfs:///kudu-backups \
Table1 Table2
You can use the KuduRestore Spark job to restore one or more Kudu tables.
Common flags/options that you can use to restore tables:
--rootPath: It is the root path to the backup data.
--kuduMasterAddresses: Is used to specify comma-separated addresses of Kudu masters
--tableSuffix: By default, the restore job creates tables with the same name as the table that was backed up. If you want to side-load the tables without affecting the existing tables, you can specify the suffix.
--timestampMs: It is a UNIX timestamp in milliseconds that defines the latest time to use when selecting restore candidates. Default: System.currentTimeMillis()
<table>…: It is used to specify a list of tables.
Example - below will take restore table1 & table2
spark-submit \
--class org.apache.kudu.backup.KuduRestore \
kudu-backup2_2.11-1.10.0.jar \
--kuduMasterAddresses master1-host \
--rootPath hdfs:///kudu-backups \
Table1 Table2
You can use the KuduBackup Spark job to backup one or more Kudu tables.
Common flags/ options that you can use while taking a backup:
--rootPath: The root path is used to output backup data. It accepts any Spark-compatible path.
--kuduMasterAddresses: Is used to specify comma-separated addresses of Kudu masters.
<table>…: Used to indicate a list of tables that you want to back up.
Example - below will take backup of table1 & table2
spark-submit \
--class org.apache.kudu.backup.KuduBackup \
kudu-backup2_2.11-1.10.0.jar \
--kuduMasterAddresses master1-host \
--rootPath hdfs:///kudu-backups \
Table1 Table2
You can use the KuduRestore Spark job to restore one or more Kudu tables.
Common flags/options that you can use to restore tables:
--rootPath: It is the root path to the backup data.
--kuduMasterAddresses: Is used to specify comma-separated addresses of Kudu masters
--tableSuffix: By default, the restore job creates tables with the same name as the table that was backed up. If you want to side-load the tables without affecting the existing tables, you can specify the suffix.
--timestampMs: It is a UNIX timestamp in milliseconds that defines the latest time to use when selecting restore candidates. Default: System.currentTimeMillis()
<table>…: It is used to specify a list of tables.
Example - below will take restore table1 & table2
spark-submit \
--class org.apache.kudu.backup.KuduRestore \
kudu-backup2_2.11-1.10.0.jar \
--kuduMasterAddresses master1-host \
--rootPath hdfs:///kudu-backups \
Table1 Table2
Comments
Post a Comment