Taking BackUp of Closed Indices on Local File System

I am trying to Archive (BackUP) the closed Indices, by taking a copy and saving it in our Local File System and delete the closed indices after successful copy.

Please advice on it.

do u have the indices in one-node? If not, what is it u are backing? all primaries/replicas? Why not use backup feature of ES?

Yes its on 1 node and all the data is primary. I have to capture all the closed indices and archive

Are you suggesting Snapshot feature.

Please share steps or sample code.

I think an index needs to be open if you're going to include it in a snapshot.

You cannot snapshot closed indices as they are unavailable.
If you have a single node you can also take snapshots to the local FS.

For one-node scenarios backing the index from the data folder and using later works fine. We tried in test environments and it worked fine.

Please share the steps for implementation.

We don't have other way, like finding the closed indices and copy it to a different location as a backup

what do u mean by implementation? What we do (in our test environment), close the index, go to ES data folder => [es cluster name] => nodes => 0 => [index name] and take a backup of the folder.