[
https://issues.apache.org/jira/browse/HBASE-12325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matteo Bertozzi updated HBASE-12325:
------------------------------------
Attachment: DeleteRemoteSnapshotTool.java
I had a tool that I wrote long time ago, I haven't checked if it work now but
it should.
anyway, you are using export in a wrong way :)
The initial design was exporting from one hbase cluster to another, not from
hbase to a backup disk. mainly because you need someone that takes care of
cleaning unused file.
so in case you want to export to disk you can:
* Create one folder per snapshot, which allows you to use rm -rf to drop the
snapshot, but you don't get delta updates.
* Create a "month-x" folder and drop all the snapshot of month x, which allows
you to get the delta updates, and allows you drop all the snapshot of month-x
with a simple rm -rf
...or, you can use the tool. but the tool requires coordination.
You can not run both the tools and export snapshot together, otherwise the tool
may remove the files in progress.
so, in my opinion this tool doesn't belong to hbase-core, because once your
stuff are not under the hbase control it is your responsibility do the
coordination (so, don't try to propose a zk-lock taken by both the tool and
export or similar).
> Add Utility to remove snapshot from a directory
> -----------------------------------------------
>
> Key: HBASE-12325
> URL: https://issues.apache.org/jira/browse/HBASE-12325
> Project: HBase
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Elliott Clark
> Assignee: Elliott Clark
> Attachments: DeleteRemoteSnapshotTool.java
>
>
> If there are several snapshots exported to a single directory, it's nice to
> be able to remove the oldest one. Since snapshots in the same directory can
> share files it's not as simple as just removing all files in a snapshot.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)