0
0
Hadoopdata~10 mins

Backup and disaster recovery in Hadoop - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a backup directory in HDFS.

Hadoop
hdfs dfs -mkdir [1]
Drag options to blanks, or click blank then click option'
A/user/data
B/input
C/tmp
D/backup
Attempts:
3 left
💡 Hint
Common Mistakes
Using a directory path that already exists or is not intended for backup.
Forgetting the leading slash in the directory path.
2fill in blank
medium

Complete the code to copy data from HDFS to the backup directory.

Hadoop
hdfs dfs -cp [1] /backup/
Drag options to blanks, or click blank then click option'
A/user/hadoop/data
B/backup
C/tmp/data
D/user/hadoop/logs
Attempts:
3 left
💡 Hint
Common Mistakes
Copying from the backup directory itself.
Using a temporary or unrelated directory as source.
3fill in blank
hard

Fix the error in the command to restore data from backup to the original location.

Hadoop
hdfs dfs -mv /backup/[1] /user/hadoop/data
Drag options to blanks, or click blank then click option'
Alogs
Bbackup
Cdata
Dtmp
Attempts:
3 left
💡 Hint
Common Mistakes
Using the backup directory name instead of the data folder.
Using unrelated folder names like 'logs' or 'tmp'.
4fill in blank
hard

Fill both blanks to create a snapshot of the /user/hadoop/data directory.

Hadoop
hdfs dfsadmin -allowSnapshot [1]
hdfs dfs -createSnapshot [2] snapshot1
Drag options to blanks, or click blank then click option'
A/user/hadoop/data
B/backup
D/tmp
Attempts:
3 left
💡 Hint
Common Mistakes
Allowing snapshots on one directory but creating snapshot on another.
Using backup or temporary directories instead of the data directory.
5fill in blank
hard

Fill all three blanks to list snapshots, delete a snapshot, and verify deletion.

Hadoop
hdfs dfs -ls [1]
hdfs dfs -deleteSnapshot [2] [3]
hdfs dfs -ls [1]
Drag options to blanks, or click blank then click option'
A/user/hadoop/data
Csnapshot1
Dsnapshot2
Attempts:
3 left
💡 Hint
Common Mistakes
Using different directories for listing and deleting snapshots.
Deleting a snapshot that does not exist.