I’ve created my first addons and maybe someone else will be interested here.
The ftp-backup will create a password protected ZIP Archive of the home assistantconfiguration (/config) and stores the ZIP under /backup
Once it finished it will upload the ZIP Archive to the configured ftp server.
It really depends on your SFTP Server used.
A simple sftp example would look like following:
{
“ftpprotocol”: “sftp”,
“ftpserver”: “example.myserver.com”,
“ftpport”: 22,
“ftpbackupfolder”: “homeassistant”,
“ftpusername”: “ftpusername”,
“ftppassword”:“ftppassword”,
“addftpflags”: “”,
“zippassword”: “homeassistant”
}
I’ve tried setting it up, but is getting the following error:
[Info] trying to upload /backup/homeassistant_backup_20180201222104.zip to sftp://nas.mysite.com:22/test/
curl: (51) SSL peer certificate or SSH remote key was not OK
Trying to login on the SFTP user with filezilla works great. The SFTP server is running on a Synology NAS.
Every time you start the addon it will perform a backup.
I just fixed an issue with the slug.
Seems that the “-” in the slug “ftp-backup” was causing issues.
With Version 0.2.4 you should now be able to use automations with the addon.
So you can trigger the addon whenever you like
What I will look into (if I find some spare time) is to perform only backup if there has been changes to the configuration meanwhile.
After some research the repository ID is c80014cb and the slug I defined is ftpbackup
I got it via SSH and the commend “hassio supervisor info|more”.
You can also get the slug by opening the hass.io webinterface:
mine looks like https://[server]/hassio/addon/c80014cb_ftpbackup
I am one of the happy users that use your add-on. Thanks for providing this to the community.
I would like to ask for an enhancement…
Right now, it creates a backup of /config, puts it in /backup and upload that file to FTP.
I would like if it is possible to just upload the whole /backup folder to FTP.
Maybe you could at a flag in the user-config that says “backup whole backup directory”?
Reason for asking is that I have daily full snapshots configured and I would like to put these on FTP instead of just the /config folder. The snapshots contain much more IMHO…
Your feedback is very welcome.
Currently my free smarthome time is going into migrating into lovelace-ui .
But as soon as I have finished this I will implement your enhancement.
I created an enhancement request for this: https://github.com/leinich/hassio-addons/issues/3