Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to create & recover a snapshot

avatar

Hi guys,
I have been using AWS machine for practice.My Question is :
How i Create & Recover Snapshot ?
Please explain.
Thanks,
Mudassar Hussain

1 ACCEPTED SOLUTION

avatar
Master Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
11 REPLIES 11

avatar
Master Mentor

@Mudassar Hussain

I am positive that command should and will work without fail if you have successfully created a snapshottable directory. Its a sub command of hdfs can you simply run hdfs a the hdfs user?

$ hdfs Usage: hdfs [--config confdir] [--loglevel loglevel] COMMAND 
where COMMAND is one of: 
dfs 			run a filesystem command on the file systems supported in Hadoop. 
classpath 		prints the classpath 
namenode -format 	format the DFS filesystem 
secondarynamenode 	run the DFS secondary namenode 
namenode 		run the DFS namenode 
journalnode 		run the DFS journalnode 
.......
........
snapshotDiff 		diff two snapshots of a directory or diff the current directory contents  a snapshot 
lsSnapshottableDir 	list all snapshottable dirs owned by the current user 
Use -help to see options 
....

Most commands print help when invoked w/o parameters.

Now once you have confirmed the above run as below

# su - hdfs
$ hdfs lsSnapshottableDir 
output ..........................
drwxr-xr-x 0 mudassar hdfs 0 2018-03-15 10:38 1 65536 /user/mudassar/snapdemo 

That the directory I created to reproduce your issues on my cluster.

avatar

@Geoffrey Shelton Okot
I have successfully created and recover snapshot directory.
Please see the below screen :

62935-snapshotdir.jpg
and another question is :
For example if do not remembered the snapshot details number which is something like that "s20180316-053628.936" ?
is the another way to recover the snapshot without this detail ?
Thanks