Incremental or delta snapshot

(Vinod Rao) #1

Hi Team,

How can we perform incremental/delta snapshots?

(David Pilato) #2

If you run a new Snapshot against the same repository, it will be incremental as it will try to use the same segments (files).

(Vinod Rao) #3

But i can see the error in logs.{"error":"InvalidSnapshotNameException[[director:snapshot1] Invalid snapshot name [snapshot1], snapshot with such name already exists]","status":400}

(Mark Walkom) #4

That's the important part to note, so give it a new name.

(Vinod Rao) #5

Yes we can give but i want to make it as cronjob for snapshot

(Mark Walkom) #6

Use the date command and add $now to the name.

(Fizerkhan) #7

@warkolm, if i give a new name and it is incremental, then how do i restore a backup since restore command take one snapshot name?

(Fizerkhan) #8

@vinod_rao, you can write backup shell script as follows

yest=$(date -d "-1 days" +"%Y.%m.%d")
echo $yest
curl -XPUT "<hostname>:9200/_snapshot/<repository_name>/dashboards-$yest?wait_for_completion=true&pretty" | while read output;
  echo $output

(Mark Walkom) #9

It automatically takes all the required pieces of previous backups.

(system) #10