Hi, I have a requirement to empty certain vaults periodically and then refill them. I'd rather not delete the vault and recreate it and all the permissions if possible.
For a vault with 500 items in it is taking about 20 mins to do this using CLI 2.7 like this:
for item_name in $(op item list --vault $VAULT_NAME --format=json | jq -r '..id')
op item delete $item_name --vault $VAULT_NAME
I also tried the below but it caused a runtime out of memory error when performed on a vault with 500 items:
op item list --vault $VAULT_NAME –format json | op item delete - --vault $VAULT_NAME
I also tried the below but the syntax isn't valid:
op item list --vault $VAULT_NAME --format=json | jq -r '..id' | op item delete - --vault $VAULT_NAME
I wonder what the best/most efficient/quickest way is to do this via CLI? Otherwise I have to do manually via the 1Password windows app.
1Password Version: CLI 2.7.1
Extension Version: Not Provided
OS Version: Oracle Linux 7
Browser:_ Not Provided