cassandra
[cassandra] 백업 - nodetool snapshot
'김용환'
2017. 1. 31. 11:03
cassandra는 백업을 지원한다. cassandra에서는 snapshot이라고 부른다.
nodetool snapshot 커맨드를 사용해서 snapshot을 생성할 수 있다.
$ nodetool snapshot -cf activity_history google
Requested creating snapshot(s) for [google] with snapshot name [1485312417477]
Snapshot directory: 1485312417477
정상적으로 저장되었는지 확인하려면 다음 커맨드를 실행한다. snapshot이라는 디렉토리가 생성되어 있다. ss
$ ls /data2/cassandra/data/google/activity_history-e37110b0b41c11e583234b983626f83b/snapshots/
1485312417477
해당 파일로 복구할 수 있다.
복구는 sstableloader를 사용한다.