Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # user - HBase snapshots


Copy link to this message
-
Re: HBase snapshots
oc tsdb 2013-11-20, 07:42
Hi Matteo,

Thanks a lot for your quick and detailed explanation.

-OC
On Tue, Nov 19, 2013 at 10:43 PM, Matteo Bertozzi
<[EMAIL PROTECTED]>wrote:

> > 1.Is there a way to take incremental snapshots on HBase tables?
> >
>
> Due to the nature of hbase, when hfiles gets compacted your table will not
> share files with the snapshot causing the next snapshot to don't share
> hfiles (or share a few) with the previous snapshot. The other approach will
> be using logs to have an incremental snapshots but logs contains different
> tables, so you may end up with more space used, and for sure more time to
> restore since you must replay the logs.
>
>
> > 2.Can we export snapshots to outside of HDFS(e.g backup server)?
> >
>
> the ExportSnapshot tool takes a destination path as argument, so as long as
> the destination filesystem is supported by the FileSystem class you can.
> (e.g. you can export with -copy-to=file:///mnt/backup-mount-point/hbase)
>
>
> > 3.Is it possible to take a snapshot for all tables in one command?
> >
>
> No, but you can do a simple script that does a for each table in
> admin.listTable(), admin.snapshot(table, snapshotName)
>
>
> > 4.Does HBase support to take automatic snapshots based on configured
> > timeout?
> >
>
> No, hbase doesn't do job scheduling.
> you may use a cron job to execute a shell command, "echo snapshot
> 'tableName', 'snapshotName' | hbase shell"
>
>
> >
> > Please also let us know if there is any better way to take HBase tables
> > backup.
> >
>
> There are different solutions that you can use: Replication, CopyTable,
> HDFS files copy + CopyTable and maybe others it depends on what you're
> looking for.
> There is an article here that explains how  to use CopyTable as backup
> tool:
>
> http://blog.cloudera.com/blog/2012/06/online-hbase-backups-with-copytable-2/
>