Using CLI for night backups?
Hello,
I am new to the topic of 1Password CLI. I have installed the CLI on a Linux server under Ubuntu. Accessing and retrieving credentials works perfectly so far.
We want to use the CLI to copy reports or backups from some cloud services at night. However, I don't understand the concept of the CLI.
I understood that I have to start a session with op signin
. Since the Linux server is booted only once a month, this can be done by a natural person. But by the time the backups start in the night, the session has already expired.
This means I would have to program a kind of loop that sends a dummy 1password cli command every 30 minutes just to keep the session open. In addition, this must be done during the day until the next night.
Have I understood this correctly? Is this the only way or is there a smarter solution that I haven't found yet?
Thanks for any hints.
ciao
ryder_hook
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided
Comments
-
Hey @ryder_hook ,
Since the CLI grants access to all of your 1Password data and vaults, we don't allow keeping it unlocked for more than 30 minutes if it is unused. We have received similar feedback to yours and are considering allowing longer session periods.
For now, there are two options:
- Automate a script to send any command to the CLI every 20-25 minutes to keep the session alive (e.g.
op get item xxx
). - Automate a script to log into the CLI when needed.
The 2nd option is not something we recommend as it would require you to store your credentials in a script in plaintext on the hard drive of the machine, which is a security risk, but we have seen other users do that and recommend it here in the forum. Please consider this option thoroughly and carefully, and all of its consequences for the worst case scenario.
0 - Automate a script to send any command to the CLI every 20-25 minutes to keep the session alive (e.g.
-
Hey @ag_yaron,
thanks for your answer. It is a real pity that there is no other option. Thank you very much for the explanations.0 -
Glad I could help, and thank you for the feedback and input :)
0