diff --git a/atom.xml b/atom.xml index ca3956be0a..80e40e87bc 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/announcements/atom.xml b/blog/categories/announcements/atom.xml index 3b44175d0d..1f5b5d355c 100644 --- a/blog/categories/announcements/atom.xml +++ b/blog/categories/announcements/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Announcements | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index 0e3e930773..a58f235a18 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 412dafefa8..704d9968e7 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index c58cf04bb8..92b08f7901 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index e6427557e4..3d071d26a5 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index be31383989..269107f236 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index 0e9f33c93d..55bd3cabbb 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml index a1b67744a8..708b9002d9 100644 --- a/blog/categories/iot-data/atom.xml +++ b/blog/categories/iot-data/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: IoT-Data | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/merchandise/atom.xml b/blog/categories/merchandise/atom.xml index 8dbf93a0a6..d8e1ed563a 100644 --- a/blog/categories/merchandise/atom.xml +++ b/blog/categories/merchandise/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Merchandise | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/micropython/atom.xml b/blog/categories/micropython/atom.xml index 13649287d4..a87eea5e5e 100644 --- a/blog/categories/micropython/atom.xml +++ b/blog/categories/micropython/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Micropython | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 731cb45eca..b5c95e8c92 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index baa9e548f6..459d6e658e 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index e053583680..be2cd89884 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 4c7d3245d5..c9f28d29af 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index 0a24e5f185..77f98da5b6 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 8157691ed9..072484f975 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index d3327d41ab..08febcaeb1 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index 624e6f8659..b6fa67529d 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index 95ff7c5262..6a1c1dfec1 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index 04e2c43bd4..b094ba0e2c 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index 4cb57937dd..a80c992e3c 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index 281068fdf6..70f332f145 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2017-04-29T10:22:14+00:00 + 2017-04-29T12:11:09+00:00 https://home-assistant.io/ diff --git a/docs/ecosystem/backup/backup_usb/index.html b/docs/ecosystem/backup/backup_usb/index.html new file mode 100644 index 0000000000..af88c4a812 --- /dev/null +++ b/docs/ecosystem/backup/backup_usb/index.html @@ -0,0 +1,400 @@ + + + + + + + + + Configuration Backup to USB drive - Home Assistant + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+
+ +
+

+ Configuration Backup to USB Drive +

+
+
+

Backing upyour Home Assistant configuration to USB. A good plus side is that you don’t need to mask all your passwords since the backup is locally at your home/residence.

+

Requirements

+

First you need a USB stick. Once you have one you need to prepare it to be used on your device. +Once connected you want to format/work with the drive. To know what path it is in, you can check with dmesg.

+
# dmesg | grep sd
+[    0.909712] sdhci: Secure Digital Host Controller Interface driver
+[    0.916414] sdhci: Copyright(c) Pierre Ossman
+[    0.923366] sdhost: log_buf @ bac07000 (fac07000)
+[    0.989001] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
+[    1.049095] sdhci-pltfm: SDHCI platform and OF driver helper
+[726257.743301] sd 0:0:0:0: Attached scsi generic sg0 type 0
+[726259.184810] sd 0:0:0:0: [sda] 124846080 512-byte logical blocks: (63.9 GB/59.5 GiB)
+[726259.185603] sd 0:0:0:0: [sda] Write Protect is off
+[726259.185613] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
+[726259.186432] sd 0:0:0:0: [sda] No Caching mode page found
+[726259.186445] sd 0:0:0:0: [sda] Assuming drive cache: write through
+[726259.206085]  sda: sda1
+[726259.209004] sd 0:0:0:0: [sda] Attached SCSI removable disk
+
+
+

Here we see we have a drive on /dev/sda1. We assume you created a partition on the drive to start with. This can be any type of partition. Preferred is a Linux filesystem type so you can set permissions!

+

Mount the drive (as root) to /media

+
# mount /dev/sda1 /media/
+
+
+

Prepare USB Stick

+

Change into it and create a folder called hassbackup and change the ownership to the user that runs Home Assistant. In my case group and user are both homeassistant.

+
# cd /media/
+/media# mkdir hassbackup
+/media# chown homeassistant:homeassistant hassbackup/
+/media# ls -al
+total 28
+drwxr-xr-x  4 root          root           4096 Apr 29 10:36 .
+drwxr-xr-x 22 root          root           4096 Mar 22 18:37 ..
+drwxr-xr-x  2 homeassistant homeassistant  4096 Apr 29 10:36 hassbackup
+drwx------  2 root          root          16384 Apr 29 10:18 lost+found
+
+
+

You can ignore ‘lost+found’.

+

Install Dependency

+

In order to preserve space on your drive we use zip. Install that too.

+
/media# apt-get install zip
+Reading package lists... Done
+Building dependency tree
+[...]
+Setting up zip (3.0-8) ...
+
+
+

Install and run script

+

Become the homeassistant user and place the following script to a place of your liking.

+
# wget https://gist.githubusercontent.com/riemers/041c6a386a2eab95c55ba3ccaa10e7b0/raw/86727d4e72e9757da4f68f1c9d784720e72d0e99/usb_backup.sh
+
+
+

Make the downloaded script executable.

+
# chmod +x usb_backup.sh
+
+
+

Open up the file and change the paths you want to use, then simply run the ./usb_backup.sh.

+
$ .homeassistant/extraconfig/shell_code/usb_backup.sh
+[i] Creating backup
+[i] Backup complete: /media/hassbackup/hass-config_20170429_112728.zip
+[i] Keeping all files no prunning set
+
+
+

Crontab

+

In order for this to automatically make a backup every night at 3 am, you can add a crontab for it as the homeassistant user. +Change below path to where you placed the usb_backup.sh and run the following line.

+
(crontab -l 2>/dev/null; echo "0 3 * * * /home/homeassistant/.homeassistant/extraconfig/shell_code/usb_backup.sh") | crontab -
+
+
+

Auto mount

+

This does not automaticly mount your USB drive at boot. You need to do that manually or add a line to your /etc/fstab file.

+

If your drive is on /dev/sda1, you could add a entry to your /etc/fstab like so:

+
/dev/sda1  /media               ext4    defaults,noatime  0       1
+
+
+

Manual step to mount the USB drive:

+
# mount /dev/sda1 /media
+
+
+
+
+ +
+
+ + + + diff --git a/sitemap.xml b/sitemap.xml index 6d162ec0df..f19401c302 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -3115,6 +3115,9 @@ https://home-assistant.io/docs/ecosystem/backup/backup_dropbox/ +https://home-assistant.io/docs/ecosystem/backup/backup_usb/ + + https://home-assistant.io/docs/autostart/init.d/ @@ -3200,62 +3203,62 @@ https://home-assistant.io/demo/frontend.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/demo/index.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-event.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-info.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-service.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-state.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-template.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/demo/panels/ha-panel-history.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/demo/panels/ha-panel-iframe.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/demo/panels/ha-panel-logbook.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/demo/panels/ha-panel-map.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/googlef4f3693c209fe788.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00 https://home-assistant.io/static/mdi-demo.html -2017-04-29T10:21:29+00:00 +2017-04-29T12:10:16+00:00