Skip to content

Hassio addon for creating backups and moving them to remote server

License

Notifications You must be signed in to change notification settings

krzkowalczyk/hassio-remote-backup2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remote Backup

GitHub Release GitHub license

Automatically create Hass.io snapshots to remote server using SCP or SMB protocol.

This addon is based on overkill32/hassio-remote-backup addon.


Table of Contents

About

When the add-on is started the following happens:

  1. Crontab backup entry is beeing created according to schedule defined in configuration.
  2. Crond starts and takes care of backup script execution.
  3. When the right time comes, snapshot are being created locally with a timestamp name, e.g. Automatic backup 2018-03-04 04:00.
  4. The snapshot are copied to the specified remote location using SCP or SMB protocol.
  5. The local backup are removed locally again.

Note the filenames of the backup are given by their assigned slug.

Installation

  1. In Home-assistant supervisor panel go to Add-on-store and from options menu click Repositories.
  2. Paste the repository link into Add reposotory field and select add.
  3. Select addon from Add-on store and click install.

Configuration

Parameter Required Description
ssh Ssh remote backup config
  host No The hostname/url to the remote server.
  port No The port to use to SCP on to the server.
  user No Username to use for SCP.
  key No The ssh key to use. Not that it should NOT be password protected.
smb SMB remote backup config
  host No The hostname/url to the remote server.
  user No Username to use for SMB.
  password No The password to use when connection to SMB share.
remote_directory Yes The directory to put the backups on the remote server.
snapshot_password No If set then the backup will be contained in a password protected zip
keep_local_backup No Control how many local backups you want to preserve. Default ("") is to keep no local backups created from this addon. If all then all loocal backups will be preserved. A positive integer will determine how many of the latest backups will be preserved. Note this will delete other local backups created outside this addon.
schedule yes Backup schedule execution in cron format. Ex: 1 1 * * * (Everyday at 1:01am)

Example: daily backups at 4 AM to contoso SMB

Add-on configuration:

smb:
  host: contoso.corp
  user: contoso
  password: contoso1234
ssh:
  host: ''
  port: 22
  user: ''
  key: []
remote_directory: hassio/backup/
snapshot_password: ''
keep_local_backup: ''
schedule: 4 0 * * *

Note: This is just an example, don't copy and past it! Create your own!

Changelog & Releases

This repository keeps a change log. The format of the log is based on Keep a Changelog.

Releases are based on Semantic Versioning, and use the format of MAJOR.MINOR.PATCH. In a nutshell, the version will be incremented based on the following:

  • MAJOR: Incompatible or major changes.
  • MINOR: Backwards-compatible new features and enhancements.
  • PATCH: Backwards-compatible bugfixes and package updates.

About

Hassio addon for creating backups and moving them to remote server

Resources

License

Stars

Watchers

Forks

Packages

No packages published