External USB drive for Hass.io snapshots

I want to save my snapshots to a USB thumb drive but the instructions here https://home-assistant.io/hassio/external_storage/ make no sense to my brain whatsoever. Anyone doing this that can explain with a little more detail? Once figured I’ll provide a video and update the docs.

1 Like

Per the instructions, anything mounted into /usr/share/hassio/share will be seen in the container.

mkdir /usr/share/hassio/share/ThumbDrive
mount /dev/sda1 /usr/share/hassio/share/ThumbDrive

Will mount /dev/sda1 to /usr/share/hassio/share/ThumbDrive

This is how I am understanding the instructions.

Hope this helps.

@firstof9 Thanks! I’ll give that a try tonight. Be great if the native share location used by snapshots is an external drive.

Based on my poking around remotely just now, it appears as though the USB drive is being automatically mounted as /media/USB. Based on that, how would you suggest I replace the destination /backup (where the snapshots get automatically stored) with /media/USB?

Step 1: Find the dev name for the USB drive fdisk -l
Step 2:

umount /media/USB
umount /backup
mount <dev name from the fdisk command> /backup

That should unmount the USB form /media/USB and unmount /dev/mmcblk0p6 from /backup and then mount your USB as /backup producing the result you want.

Unfortunately fdisk -l returns nothing.

Are you root?

Default login for hass.io is root but there is no access to the core system in hass.io hence the confusion and questions in regards to how it’s done.

Sorry @xbmcnut it looks like you’re going to need help from someone with more experience with hass.io :frowning:

Agreed @firstof9. Thank you very much for your help. I think the instructions could do with some lay person clarification.

Did you ever find the solution to mounting external drives in HASSIO?

@tmharris. Sorry, no.

Any progress to mounting external drives so far?

Not sure if it is what the TS wanted to achieve, but I was able to create a backup of my /config/ folder following this steps on my RPi running Hass.io :

  1. ssh [email protected]

  2. create your favourite backup script (here is my one based on a script found here)
    #set -x

Developed 30Nov2016

Chip Cox

designed to backup hass directory from a Raspberry Pi running Home Assistant in a virtual environment

Set Directory and filename variables

This is the mount point for my usb drive.

your destination directory will probably be different


I’m starting this backup in the home directory for the hass user.


#current date format DDMONYYYY
current_time=$(date +"%Y%m%d_%H%M%S")

build output filename


display backup information.

echo $filename > ~/backup.log
echo “Current Time : $current_time” >> ~/backup.logi

Create athe tar file given with verbose output and put the contents of srcdir in it.

excluding .cache directory

cmd=“tar -cvf $filename --exclude .cache --exclude .db --exclude ._* --exclude .DS_Store --exclude .TemporaryItems --exclude .cloud --exclude home-assistant.log $srcdir”

echo $cmd >> ~/backup.log


eval $cmd >> ~/backup.log
#now that you have the tar file, zip it up to save space.
gzip $filename >> ~/backup.log

  1. save it as backupha anywhere and then move to /usr/local/bin/
  2. plug in a USB drive into RPi
  3. in terminal type backup and hit Enter.

After all that your filedir will contain a backup file and in your home directory there will be backup.log file with all backup output.


have a pull request pending for Hassio to add support for using a backup filesystem, which can be located on a USB stick for example.




1 Like

I suppose that backup could be used for storing other stuff as well? :slight_smile:

No different to current backup location really in terms of what you can do. There are issues with the supervisor container occasionally starting first so I wouldn’t rely on using it for anything that utilises that from boot.

Sound good! Thinking of using it as a ftp location for my ip camera videos.

you need to ssh on port 2222