Example for duplicating items from one vault to another not funtional

phatmandrakephatmandrake
Community Member
edited September 5 in CLI

To duplicate all the items from an account to another account:

op item list --vault test-vault --format json --account agilebits | \
op item get --format json --account agilebits - | \
op item create --account work -

I am using this modified version:
op item list --tags "Test_Items" --format json | op item get --format json | op item create --vault test

I get the following non-specific error:
unable to process line 2: Network: (DB: (409) (Conflict), Internal server conflict.), DB: (409) (Conflict), Internal server conflict.

If I specify an alternate account it still doesn't work. I don't think it's capable of differentiating between objects in the json array.

If I loop through each object with a shell command and call op item create for each item individually it works just fine, but the example indicates it should be able to handle it without a loop.

Powershell/Zsh


1Password Version: 8
Extension Version: Not Provided
OS Version: MacOS 12.5.1
Browser:_ Not Provided

Comments

  • andi.t_1Pandi.t_1P

    Team Member

    Hi @phatmandrake , thank you for finding this! This is indeed a bug for on the caching side when dealing with creating items, when multiple are passed through piped input. I have filed an internal issue and figured out where the problem originated from. We will soon remediate this.

    Best,
    Andi

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file