I am using ElasticSearch 1.5.0 and curator 3.2.3.
I recently created a script to be executed as daily cron job which deletes all snapshots older than a week. But when executed, it deletes each and every snapshot in my S3 repository.
Following is the code snippet used for this:
/usr/local/bin/curator --timeout 21600 delete snapshots --repository $RESPOSITORY_NAME $snapshot_delete_string
where RESPOSITORY_NAME is the name of the S3 repository I am using and snapshot_delete_string is of the format [--snapshot snapshot_name]+
The log for the last execution of this script is below:
2015-12-10 04:00:04,825 INFO Job starting: delete snapshots 2015-12-10 04:00:08,564 INFO Adding curator-20151203150012 from command-line argument 2015-12-10 04:00:08,564 INFO Adding curator-20151203180012 from command-line argument 2015-12-10 04:00:08,564 INFO Adding curator-20151203210011 from command-line argument 2015-12-10 04:00:08,564 INFO Deleting snapshot curator-20151203150012 2015-12-10 04:03:14,586 INFO Deleting snapshot curator-20151203180012 2015-12-10 04:05:54,822 INFO Deleting snapshot curator-20151203210011 2015-12-10 04:08:21,964 INFO Deleting snapshot curator-20151204000013 2015-12-10 04:10:57,958 INFO Deleting snapshot curator-20151204030013 2015-12-10 04:13:31,731 INFO Deleting snapshot curator-20151204060013 .......... and may other snapshots, skipped here 2015-12-10 05:17:07,989 INFO Deleting snapshot curator-20151210030012 2015-12-10 05:18:59,970 INFO Job completed successfully