테스트 하기전, hbase table 을 백업해두고 싶을때가 있다.
hbase shell 에서
snapshot 'tablename', 'snapshot-tablename'
을 하면 snapshot 이 만들어진다.
생성된 snapshot 을 확인하기 위해서는
list_snapshots
하면 위에서 생성한 'snapshot-tablename' 이 보인다.
테스트가 끝난후 백업해둔 테이블을 복구 하고 싶을땐
사용하던 테이블을 disable 한 후, restore 한다.
disable 'tablename'
restore_snapshot 'snapshot-tablename'
끝.
댓글 없음:
댓글 쓰기