Incremental or delta snapshot

Hi Team,

How can we perform incremental/delta snapshots?

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

1 Like

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

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

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

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

@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?

@vinod_rao, you can write backup shell script as follows

#!/bin/sh
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;
do
  echo $output
done

It automatically takes all the required pieces of previous backups.