Giter Site home page Giter Site logo

1password-backup-sync's Introduction

1Password Backup Sync

Syncs 1Password's backup files to multiple Macs. This applies to 1Password bought as standalone license, not membership.

Tested on:

  • macOS Big Sur (Intel)
  • macOS Monterey (Intel)
  • macOS Ventura (Apple Silicon)

Getting Started (One Time Setup)

IMPORTANT: Repeat the following steps in each host.

  • Ensure SSH keypair exists (ex: ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub). If missing, run create one:
ssh-keygen
  • Copy public key (ex: ~/.ssh/id_rsa.pub) to each remote host's ~/.ssh/authorized_keys. If this file doesn't exist, create it.

  • Ensure the current machine's .ssh/ directory and file have correct permission:

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
  • In the current machine's /etc/hosts:
    • Add all remote hosts
    • Add hostname to 127.0.0.1
127.0.0.1      localhost myshittycode # if current machine's hostname is "myshittycode"
192.168.1.100  donkeykong # remote host 1
192.168.1.200  supermario # remote host 2
  • Enable the remote login and grant yourself the access to this service.

Remote login on Mac

  • Test SSH connection to remote host to ensure they work.
ssh user@donkeykong
ssh user@supermario
  • Made a copy of inventory-sample.yml and rename it as inventory.yml.

  • Modify inventory.yml to add all hosts.

  • Test SSH connection with Ansible.

ANSIBLE_PYTHON_INTERPRETER=$(which python3) ansible all -i inventory.yml -m ping

Syncing the Latest Backup File to all Remote Hosts

To push the latest backup file from the current machine to all remote hosts, run Ansible playbook.

./1password-backup-sync.sh
  • In each remote host:

    • Open 1Password.

    • Go to Preferences > Backup.

    • The synced backup file should appear in the list.

    • Select it and click Restore button.

  • To run the playbook in the future, run 1pass in the terminal.

Restore backup file

1password-backup-sync's People

Contributors

choonchernlim avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.