Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup and restore feature #37

Open
berga opened this issue Mar 23, 2022 · 2 comments
Open

Backup and restore feature #37

berga opened this issue Mar 23, 2022 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@berga
Copy link

berga commented Mar 23, 2022

Hi Jared,

did you think about restoring config/secrets/snapshot from a previous installation
or backing up before dismantle?

@jhampson-dbre
Copy link
Owner

Especially for the restore, I think that's something that can be added. Doing a fresh install going from Debian 10 to 11 was tricky to get the backup restored from the command line, so I think that functionality could be useful to include.

@jhampson-dbre jhampson-dbre added the enhancement New feature or request label Mar 24, 2022
@jhampson-dbre jhampson-dbre added help wanted Extra attention is needed good first issue Good for newcomers labels Jun 7, 2022
@jhampson-dbre
Copy link
Owner

my notes from restore:

  1. copy backup file to HA server (or skip if file is already on server)
- hosts: all
  become: true
  tasks:
    - name: copy backup to pi
      copy:
        src: "/mnt/c/Users/jhamp/Downloads/Full Backup 2022-02-12 03_26_00.tar"
        dest: "/usr/share/hassio/backup/Full Backup 2022-02-12 03_26_00.tar"
  1. need to reload backups so it pickups up the new backup file as being available to restore
root@rpi4-20220121:/usr/share/hassio/backup# ha backups reload
Command completed successfully.
  1. we need to get the slug of the backup file to be able to restore it
root@rpi4-20220121:/usr/share/hassio/backup# ha backups list
backups:
- content:
    addons:
    - a0d7b954_nodered
    - core_mariadb
    - a0d7b954_vscode
    - core_mosquitto
    - core_check_config
    - cebe7a76_hassio_google_drive_backup
    - a0d7b954_glances
    - 85d0901c_nginx_proxy_waf
    - a0d7b954_zwavejs2mqtt
    folders:
    - homeassistant
    - share
    - addons/local
    - ssl
    - media
    homeassistant: true
  date: "2022-02-12T09:26:01.764980+00:00"
  name: Full Backup 2022-02-12 03:26:00
  protected: true
  size: 111.83
  slug: ffecdc5f
  type: full
  1. now we can issue restore command - https://www.home-assistant.io/common-tasks/os/#creating-backup-using-the-home-assistant-command-line-interface
ha backups restore ffecdc5f

not sure if there are any prompts from the restore command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants