Using loader-backup to Back Up Job Data
Scenario
After a job is created using the Loader WebUI or loader-tool, use loader-backup to back up data.
- Only Loader jobs of data export support data backup.
- This tool is an internal Loader interface and is invoked by the upper-layer component HBase. Only the data backup from HDFS to SFTP is supported.
This section applies to MRS 3.x or later.
Prerequisites
The Loader client has been installed and configured. For details, see Running a Loader Job by Using Commands.
Procedure
- Log in to the node where the client is installed as the user who installs the client. For details, see Running a Loader Job by Using Commands.
- Run the following command to go to the directory where the backup.properties file is located. For example, if the Loader client installation directory is /opt/client/Loader/, run the following command:
cd /opt/client/Loader/loader-tools-1.99.3/loader-backup/conf
- Run the following command to modify the configuration parameters of backup.properties. For details about the parameters, see Table 1.
vi backup.properties
server.url = 10.0.0.1:21351,10.0.0.2:12000 authentication.type = kerberos authentication.user = authentication.password= job.jobId = 1 use.keytab = true client.principal = loader/hadoop client.keytab = /opt/client/conf/loader.keytab
- Run the following command to go to the directory where the backup script run.sh is located. For example, if the Loader client installation directory is /opt/hadoopclient/Loader, run the following command:
cd /opt/hadoopclient/Loader/loader-tools-1.99.3/loader-backup
- Run the following command to run the backup script run.sh to back up Loader job data. The system backs up data to a directory at the same layer of the job output directory.
./run.sh Backup data input directory
For example, the backup data input directory is /user/hbase/, and the job output directory is/opt/client/sftp/sftp1. sftp1 acts as a placeholder. Run the following command to back up data to the /opt/client/sftp/hbase directory:
./run.sh /user/hbase/
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.