Skip to content

Commit

Permalink
Rename snapshot -> backup (home-assistant#18129)
Browse files Browse the repository at this point in the history
Co-authored-by: Franck Nijhof <[email protected]>
  • Loading branch information
ludeeus and frenck authored Aug 25, 2021
1 parent 5167f13 commit 03124d9
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 75 deletions.
2 changes: 1 addition & 1 deletion plugins/my.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def render(context)
"general" => "General Settings",
"info" => "Information",
"supervisor_info" => "Supervisor Information",
"supervisor_snapshots" => "Snapshots",
"supervisor_backups" => "Backups",
}

def parse_options(input, context)
Expand Down
59 changes: 59 additions & 0 deletions source/_includes/common-tasks/backups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
## Backups

Backup of your Home Assistant and add-on data and configuration. They are stored in a compressed archive file (.tar). Backups are made from the Supervisor Backups panel. There is also a service available that allows you to trigger the creation of a backup from an automation. Backups are stored in the /backup directory.

A full backup includes the following directories:

* `config`
* `share`
* `addons` (only manually installed or created add-ons, not those installed from the store)
* `ssl`
* `media`

A partial backup consists of any number of the above default directories and installed add-ons.

### Making a Backup from the UI

1. Go to {% my supervisor_backups title="Supervisor > Backups" %} in the UI.
2. Provide a name for the backup.
3. Choose full or partial.
4. Choose to password protect or not. Password-protected backups cannot easily be browsed outside of Home Assistant OS.
5. Click "Create" to begin the backup.

### Restoring a Backup on a new install

You can make use of backup which you have copied off of a previous install to restore to a new installation during the onboarding process. Follow the link at the bottom of the account creation page to upload your backup from the previous installation.

For restoring a backup at any other time, visit the Supervisor backup panel in your UI and use the following steps:

1. Select "Upload Backup" from the icon in the upper right of the page.
2. Click on the folder icon to navigate to your backup .tar file and select it.

When the upload is completed, you will be presented with the backup restore dialog for restoring it, and can then choose to restore in full or in part by manually selecting individual items.

If the backup you are uploading is more than 1GB in size, it can be faster and more efficient to make use of the Samba add-on in order to transfer files to the `/backup` directory.

The length of time it takes to create or restore backup will depend on how much you have to compress or decompress.

If you're looking to slim down your backup, check if your configuration directory contains a large database file (`home-assistant_v2.db`). See the [`recorder`](/integrations/recorder/) integration page for options to keep your database data down to a size that won't cause issues. Note the keep days, purge interval, and include/exclude options.

When the restore is complete, Home Assistant will restart to apply the new settings. You will lose the connection to the UI and it will return once the restart is completed.

### Creating backup using the Home Assistant Command Line Interface

1. `ha backups list` - lists backups and their slugnames
2. `ha backups restore slugname` - restores a specific backup
3. `ha backups new --name nameofbackup` - create a backup

Use `ha help` to get more information about the command line usage.


### Copying your backups to another location

You often need a backup in case your system has crashed. If you only store them on the crashed device, you won't be able to access them easily. We recommend that you manually copy them from `/backup` to another machine on occasion. Or even better, create an automation to handle that, or make use of one of the following add-ons:

- [Google Drive Backup](https://github.com/sabeechen/hassio-google-drive-backup)
- [Dropbox Sync](https://github.com/danielwelch/hassio-dropbox-sync)
- [Nextcloud Backup](https://github.com/Sebclem/hassio-nextcloud-backup)
- [Samba backup](https://github.com/thomasmauerer/hassio-addons/tree/master/samba-backup)
- [Remote Backup (uses scp)](https://github.com/overkill32/hassio-remote-backup)
2 changes: 1 addition & 1 deletion source/_includes/common-tasks/commandline.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Available Commands:
observer Get information, update or configure the Home Assistant observer
os Operating System specific for updating, info and configuration imports
resolution Resolution center of Supervisor, show issues and suggest solutions
snapshots Create, restore and remove snapshot backups
backups Create, restore and remove backups
supervisor Monitor, control and configure the Home Assistant Supervisor

Flags:
Expand Down
4 changes: 2 additions & 2 deletions source/_includes/common-tasks/file_access.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You would then enter the IP address or hostname of your Home Assistant OS instan

### Installing and using the SSH add-on (requires enabling advanced mode for the HA user)

The Terminal & SSH add-on provides access over an SSH connection, and also includes nano and vi editors. It can be installed from the add-on store's Official add-on repository after enabling advanced mode for your Home Assistant user's profile. Additionally, this add-on provides access to the Home Assistant Command Line Interface (CLI) which provides custom commands for checking logs, stopping and starting Home Assistant and add-ons, creating/restoring snapshots, and more. (See [Home Assistant via Command Line](https://www.home-assistant.io/hassio/commandline/) for further info). The Terminal & SSH add-on does *not* provide access to the underlying host file system.
The Terminal & SSH add-on provides access over an SSH connection, and also includes nano and vi editors. It can be installed from the add-on store's Official add-on repository after enabling advanced mode for your Home Assistant user's profile. Additionally, this add-on provides access to the Home Assistant Command Line Interface (CLI) which provides custom commands for checking logs, stopping and starting Home Assistant and add-ons, creating/restoring backups, and more. (See [Home Assistant via Command Line](https://www.home-assistant.io/hassio/commandline/) for further info). The Terminal & SSH add-on does *not* provide access to the underlying host file system.

To use the add-on, enter a password or public key on its configuration page, then save and start the add-on.

Expand All @@ -47,7 +47,7 @@ The Terminal & SSH add-on also provides a web terminal which allows you to acces

### Installing and using the Visual Studio Code (VSC) add-on

The Visual Studio Code add-on provides access through a feature packed web-based version of the Visual Studio Code editor and currently only supports AMD64 and aarch64/ARM64 machines. This add-on can be installed in the add-on store from the Community add-on repository. The add-on also provides access to the Home Assistant Command Line Interface (CLI) using VSC's built in terminal, which allows for checking logs, stopping and starting Home Assistant and add-ons, creating/restoring snapshots, and more. (See [Home Assistant via Command Line](https://www.home-assistant.io/hassio/commandline/) for further info).
The Visual Studio Code add-on provides access through a feature packed web-based version of the Visual Studio Code editor and currently only supports AMD64 and aarch64/ARM64 machines. This add-on can be installed in the add-on store from the Community add-on repository. The add-on also provides access to the Home Assistant Command Line Interface (CLI) using VSC's built in terminal, which allows for checking logs, stopping and starting Home Assistant and add-ons, creating/restoring backups, and more. (See [Home Assistant via Command Line](https://www.home-assistant.io/hassio/commandline/) for further info).

There is no configuration required for editing files within your `/config` directory. In order to enable access to other directories, it is necessary to edit the add-on's configuration from its configuration tab. See the add-on documentation for details.

Expand Down
59 changes: 0 additions & 59 deletions source/_includes/common-tasks/snapshots.md

This file was deleted.

2 changes: 1 addition & 1 deletion source/_includes/common-tasks/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Best practice for updating a Home Assistant installation:

1. Backup your installation{% if page.installation == "os" or page.installation == "supervised" %}, using the snapshot functionality Home Assistant offers{% endif %}.
1. Backup your installation{% if page.installation == "os" or page.installation == "supervised" %}, using the backup functionality Home Assistant offers{% endif %}.
1. Check the release notes for breaking changes on [Home Assistant release notes](https://github.com/home-assistant/home-assistant/releases). Be sure to check all release notes between the version you are running and the one you are upgrading to. Use the search function in your browser (`CTRL + f` / `CMD + f`) and search for **Breaking Changes**.
{% if page.installation == "os" or page.installation == "supervised" %}
1. Check your configuration using the [Check Home Assistant configuration](/addons/check_config/) add-on.
Expand Down
2 changes: 1 addition & 1 deletion source/_integrations/ozw.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ will try to migrate the entity IDs, names, icons and areas of the entities and
devices of your Z-Wave integration to your OpenZWave integration. At the end of
the migration, the Z-Wave integration configuration entry will be removed.

Make sure you take necessary backups, eg a Supervisor snapshot, before migrating
Make sure you take necessary backups, eg a Supervisor backup, before migrating
to be able to restore the Z-Wave integration. The wizard may not be able to
migrate all entity and device information. It will show you what entity and
device information failed to migrate.
Expand Down
2 changes: 1 addition & 1 deletion source/_integrations/zwave_js.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ It is perfectly doable to switch over from one of the above mentioned previous i

### In a nutshell this is what the migration path looks like

1) Make a **backup** of your Home Assistant configuration. If you're running the supervisor this is very easy to do by creating a snapshot. You should do this so you'll be able to quickly revert if you may run into unexpected problems.
1) Make a **backup** of your Home Assistant configuration. If you're running the supervisor this is very easy to do by creating a backup. You should do this so you'll be able to quickly revert if you may run into unexpected problems.

<div class='note info'>Write down/copy your Z-Wave network key somewhere, you are going to need it later.</div>

Expand Down
2 changes: 2 additions & 0 deletions source/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -2120,6 +2120,8 @@
/cookbook/#infrastructure /examples/#infrastructure
/cookbook/#automation-examples /examples
/cookbook /examples
/common-tasks/os/#snapshots /common-tasks/os/#backups
/common-tasks/supervised/#snapshots /common-tasks/supervised/#backups

# Migrated Community Guides
/cookbook/apache_configuration https://community.home-assistant.io/t/reverse-proxy-with-apache/196942
Expand Down
2 changes: 1 addition & 1 deletion source/common-tasks/os.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This section will provide guides to some common tasks and information which you
{% include common-tasks/development_version.md %}
{% include common-tasks/configuration_check.md %}
{% include common-tasks/file_access.md %}
{% include common-tasks/snapshots.md %}
{% include common-tasks/backups.md %}
{% include common-tasks/commandline.md %}
{% include common-tasks/lost_password.md %}
{% include common-tasks/third-party-addons.md %}
Expand Down
2 changes: 1 addition & 1 deletion source/common-tasks/supervised.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ installation_name: Supervised
{% include common-tasks/development_version.md %}
{% include common-tasks/configuration_check.md %}
{% include common-tasks/file_access.md %}
{% include common-tasks/snapshots.md %}
{% include common-tasks/backups.md %}
{% include common-tasks/commandline.md %}
{% include common-tasks/lost_password.md %}
{% include common-tasks/third-party-addons.md %}
2 changes: 1 addition & 1 deletion source/installation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ <h2>Compare Installation Methods</h2>
<td></td><td></td><td></td><td></td>
</tr>
<tr>
<td>Snapshots</td>
<td>Backups</td>
<td></td><td></td><td></td><td></td>
</tr>
<tr>
Expand Down
8 changes: 4 additions & 4 deletions source/more-info/free-space.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Reaching your storage limit, this page will help you when that happens.
There are several things you can do to free up some space:

- [Clean the database](#clean-the-database)
- [Delete old snapshots](#delete-old-snapshots)
- [Delete old backups](#delete-old-backups)
- [Uninstall unused add-ons](#uninstall-unused-add-ons)
- [Last resort](#last-resort)

Expand All @@ -22,10 +22,10 @@ You can [filter](/integrations/recorder/#configure-filter) what you send to
the database, and even change how long it stores the data
[with the `purge_keep_days` setting](/integrations/recorder/#purge_keep_days)

## Delete old snapshots
## Delete old backups

Open the Home Assistant UI and go to "Supervisor" in the sidebar, and then to
the "Snapshots" tab, here you will see all your snapshots, these can be
the "Backups" tab, here you will see all your backups, these can be
downloaded and placed somewhere safe. When you have done that, you can delete
them in the UI and it will free up some space for you.

Expand All @@ -47,5 +47,5 @@ documentation for your hypervisor on how to expand disks for virtual machines.
Home Assistant will auto-expand to use the newly added space.

If you are not running a VM, you need to replace your storage medium
(typically, this will be an SD card). You can use [snapshots](/hassio/haos_common_tasks/#home-assistant-os-snapshots) to quickly restore your Home Assistant
(typically, this will be an SD card). You can use [backups](/hassio/haos_common_tasks/#home-assistant-os-backups) to quickly restore your Home Assistant
installation on a new storage medium.
4 changes: 2 additions & 2 deletions source/more-info/unsupported/os.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ These operating systems are actively tested and maintained, for use with the Sup
You need to reinstall the host machine running the Supervisor on one of the supported
operating systems.

The best approach here is to take a full snapshot of your current installation
The best approach here is to take a full backup of your current installation
from the Supervisor panel, then reinstall your host with one of the supported
operating systems.

If the host is a virtual machine or a supported board, you can use our [appliance images](/hassio/installation/).

If not, you can get [Debian from here](https://www.debian.org/) and use our [convenience installation script](https://github.com/home-assistant/supervised-installer). Make sure you make it compliant with [ADR-0014](https://github.com/home-assistant/architecture/blob/master/adr/0014-home-assistant-supervised.md), the convenience script will handle most of that for you.

When the new host is set up and you can reach the Home Assistant frontend, you can upload and restore the snapshot you made earlier.
When the new host is set up and you can reach the Home Assistant frontend, you can upload and restore the backup you made earlier.

0 comments on commit 03124d9

Please sign in to comment.