Page 1 of 1

Clearing snapshots

Posted: Tue Nov 03, 2020 8:46 am
by hcltech
I had to redo my servers and attached to my offsite storage for snapshots before i removed them. Now that I have cleaned it out they are still showing up in the snapshot list. Is there a way to clear these out of nagios log server?

Re: Clearing snapshots

Posted: Tue Nov 03, 2020 9:03 am
by scottwilkerson
If you want to delete all the snapshots you need to gran the name of the repository from Admin -> Snapshots & Maintenance in the repository section and then replace <repository> in the command below and run from the CLI

Note: This will delete all snapshots and is not reversible

Code: Select all

curl -XDELETE localhost:9200/_snapshot/<repository>/*

Re: Clearing snapshots

Posted: Tue Nov 03, 2020 9:05 am
by hcltech
{"error":"InvalidSnapshotNameException[[QNAP:*] Invalid snapshot name [*], must not contain the following characters [\\, /, *, ?, \", <, >, |, , ,]]","status":400}root@cl-p-nagioslog01

Re: Clearing snapshots

Posted: Tue Nov 03, 2020 4:20 pm
by scottwilkerson
Can you delete them through the GUI?

Re: Clearing snapshots

Posted: Wed Nov 04, 2020 8:12 am
by hcltech
I tried that first it just sits there forever and does nothing.

Re: Clearing snapshots

Posted: Wed Nov 04, 2020 4:47 pm
by cdienger
Give this a try:

Code: Select all

/usr/local/nagioslogserver/scripts/curator.sh delete snapshots--all-snapshots --repository 'REPOSITORY_NAME'

Re: Clearing snapshots

Posted: Fri Nov 06, 2020 9:23 am
by hcltech
It looked like that errored out as well but it created a bunch of files in the repository. I went in and deleted all those and now my storage snapshots list is clear in the UI. Thank you.

Re: Clearing snapshots

Posted: Fri Nov 06, 2020 10:18 am
by cdienger
Odd that it would give you an error. If you run into the error again on the new setup please open a new thread and we'll take a look.