I have an question about the incremental backup in Cassandra,
My commitlog_archiving.properties i set like this
# to script multiple commands and add a pointer here. archive_command=/bin/bash /backup_cassandra/inc_backup.sh %path %name # Command to execute to make an archived commitlog live again. # Parameters: %from is the full path to an archived commitlog segment (from restore_directories) # %to is the live commitlog directory # Example: restore_command=/bin/cp -f %from %to restore_command=cp -f /cassandra/backup/* /cassandra/commitlog/ # Directory to scan the recovery files in. restore_directories=/cassandra/commitlog/
this part it just copy the live logs to /cassandra/backup/*
archive_command=/bin/bash /backup_cassandra/inc_backup.sh. (Works)
#! /bin/bash cp /cassandra/commitlog/*.log /cassandra/backup
In this step I'm coping the archived files to the live commitlog , but it seems to not be working, since when I check the live commitlog folder the archived files are not there, only the live commitlogs
restore_command=cp -f /cassandra/backup/* /cassandra/commitlog/
1 - Am I doing something wrong?
2 - Should I delete the live commitlogs before do the point in time restore?
3- So I should always leave the archive_command= active and the rest I will active only when I want to do a restore?
Sorry to ask so many questions but dataStax documentation os not clear enough.
EDIT - What I'm doing is:
I create a simple table with names, insert a few names, deleted some of them, flush the Memtables to the disk generating archivelogs (sometimes I just do shutdown and startup of cassandra to force the archivelogs to be created) after that I perfom the step below in all nodes wth the same point_in_time date, for exemple 2020:04:10 13:10:00, but the deleted rows are noot been restored.