From eaf8123226da33795adc546baabb15a98326fe05 Mon Sep 17 00:00:00 2001 From: Sebastien Clement Date: Tue, 12 Jan 2021 00:12:41 +0100 Subject: [PATCH] :pencil2: Update Readme and move documentation in DOCS.md --- README.md | 81 ++++--------------- nextcloud_backup/.README.ejs | 32 +++----- nextcloud_backup/DOCS.md | 75 +++++++++++++++++ nextcloud_backup/README.md | 35 +++----- .../naming_template.md | 0 .../views/modals/backup-settings-modal.ejs | 6 +- 6 files changed, 115 insertions(+), 114 deletions(-) create mode 100644 nextcloud_backup/DOCS.md rename naming_template.md => nextcloud_backup/naming_template.md (100%) diff --git a/README.md b/README.md index bd66c11..babf2ed 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![GitHub Release][releases-shield]][releases] ![Project Stage][project-stage-shield] -[![License][license-shield]](LICENSE.md) +[![License][license-shield]](LICENSE) ![Supports aarch64 Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] @@ -23,12 +23,16 @@ Easily backup your Home Assistant snapshots to Nextcloud ## About Easily backup your Home Assistant snapshots to Nextcloud. - +Auto backup can be configured via the web interface. ### Features -- Auto Backup : Configure this add-on to automaticly backup your HassIO instance. -- Auto Clean : You can specify the maximum number of local snapshots and (__ONLY__) auto backuped snapshots. -- Upload backed-up snapshot to Home assistant. -> __Info:__
+ +- __Auto Backup__ : Configure this add-on to automatically backup your HassIO instance +- __Selective Backup__ : You can specify witch folder and add-on you want to backup. +- __Password protected Backup__ : this add-on can use the Home Assistant snapshot encryption. +- __Auto Clean__ : You can specify the maximum number of local snapshots and (__ONLY__) auto backed-up snapshots. +- __Restore__ : Upload backed-up snapshot to Home assistant. +- __Web UI__ : All the configuration is based on an easy-to-use web interface, no yaml needed. +> __Info:__ > Auto Clean is executed after every upload and every day at 00h30 ## Installation @@ -42,65 +46,10 @@ comparison to installing any other Hass.io add-on. 1. Check the logs of the "Nextcloud Backup" add-on to see if everything went well. 1. Open the web UI for the "Nextcloud Backup" to configure the add-on. +> **NOTE**: Do not add this repository to HassOS, please use: `https://github.com/Sebclem/sebclem-hassio-addon-repository`. -**NOTE**: Do not add this repository to HassOS, please use: -`https://github.com/Sebclem/sebclem-hassio-addon-repository`. - - -## NextCloud config - -Firts, you need to configure all your Nextcloud information. - -To do this: -1. Open the add-on Web UI -1. Open NextCloud config menu (Top right gear, and Nexcloud) -1. If your NextCloud instance use `HTTPS`, enable the `SSL` lever -1. Enter the `hostname` of the NextCloud instance. You can specify a custom port by adding `:[port]` at the end of the hostname (`exemple.com:8080`) -1. Now enter the Username that you when this add-on use. -1. For password, we highly recommend to use `App Password`.
- >To generate a `App Password`, go into your personal setting into Nextcloud, Security page. You can generate one via the `Devices & sessions` section. Simply entre a name and hit `Create new app password` - -## HassOs Configuration - -**Note**: _Remember to restart the add-on when the configuration is changed._ - -Example add-on configuration: - -```json -{ - "log_level": "info", -} -``` - -**Note**: _This is just an example, don't copy and paste it! Create your own!_ - -### Option: `log_level` - -The `log_level` option controls the level of log output by the addon and can -be changed to be more or less verbose, which might be useful when you are -dealing with an unknown issue. Possible values are: - -- `trace`: Show every detail, like all called internal functions. -- `debug`: Shows detailed debug information. -- `info`: Normal (usually) interesting events. -- `warning`: Exceptional occurrences that are not errors. -- `error`: Runtime errors that do not require immediate action. -- `fatal`: Something went terribly wrong. Add-on becomes unusable. - -Please note that each level automatically includes log messages from a -more severe level, e.g., `debug` also shows `info` messages. By default, -the `log_level` is set to `info`, which is the recommended setting unless -you are troubleshooting. - -### Option: `leave_front_door_open` - -Adding this option to the add-on configuration allows you to disable -authentication on the add-on by setting it to `true` and leaving the -username and password empty. - -**Note**: _We STRONGLY suggest, not to use this, even if this add-on is -only exposed to your internal network. USE AT YOUR OWN RISK!_ - +## Configuration +The configuration documention can be found [here][config_doc] ## Support @@ -168,7 +117,7 @@ SOFTWARE. [forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg [forum]: https://community.home-assistant.io/ [i386-shield]: https://img.shields.io/badge/i386-yes-green.svg -[issue]: https://github.com/hassio-addons/addon-log-viewer/issues +[issue]: https://github.com/Sebclem/hassio-nextcloud-backup/issues [license-shield]: https://img.shields.io/github/license/Sebclem/hassio-nextcloud-backup.svg [maintenance-shield]: https://img.shields.io/maintenance/yes/2021.svg [project-stage-shield]: https://img.shields.io/badge/project%20stage-Beta-red.svg @@ -178,3 +127,5 @@ SOFTWARE. [repository]: https://github.com/Sebclem/sebclem-hassio-addon-repository [contributors]: https://github.com/Sebclem/hassio-nextcloud-backup/graphs/contributors [semver]: https://semver.org/spec/v2.0.0.htm +[config_doc]: https://github.com/Sebclem/hassio-nextcloud-backup/blob/master/nextcloud_backuo/DOCS.md + diff --git a/nextcloud_backup/.README.ejs b/nextcloud_backup/.README.ejs index 10fb034..89baf4a 100644 --- a/nextcloud_backup/.README.ejs +++ b/nextcloud_backup/.README.ejs @@ -1,40 +1,26 @@ # Home Assistant Add-ons: Nextcloud Backup +![Nextcloud Backup Logo](logo.png) [![Release][release-shield]][release] ![Project Stage][project-stage-shield] ![Project Maintenance][maintenance-shield] -[![Community Forum][forum-shield]][forum] - [![Buy me a coffee][buymeacoffee-shield]][buymeacoffee] ## About Easily backup your Home Assistant snapshots to Nextcloud. -Auto backup can be configure via the Home Assistant web interface. + ### Features -- Auto Backup : Configure this add-on to automaticaly backup your HassIO instance. -- Auto Clean : You can specify the maximum number of local snapshots and (__ONLY__) auto backup snapshots. -- Upload backed-up snapshot to Home assistant. -> __Info:__ -> Auto Clean is executed after every upload and every day at 00h30 +- __Auto Backup__ : Configure this add-on to automatically backup your HassIO instance +- __Selective Backup__ : You can specify witch folder and add-on you want to backup. +- __Password protected Backup__ : this add-on can use the Home Assistant snapshot encryption. +- __Auto Clean__ : You can specify the maximum number of local snapshots and (__ONLY__) auto backed-up snapshots. +- __Restore__ : Upload backed-up snapshot to Home assistant. +- __Web UI__ : All the configuration is based on an easy-to-use web interface, no yaml needed. -## NextCloud config - -First, you need to configure all your Nextcloud information. - -To do this: -1. Open the add-on Web UI -1. Open NextCloud config menu (Top right gear, and Nexcloud) -1. If your NextCloud instance use `HTTPS`, enable the `SSL` lever -1. Enter the `hostname` of the NextCloud instance. You can specify a custom port by adding `:[port]` at the end of the hostname (`exemple.com:8080`) -1. Now enter the Nextcloud username that you want this addon to use. -1. For password, we highly recommend using an `App Password`. - - >To generate an `App Password`, go into your personal settings in the Nextcloud Security page. You can generate one via the `Devices & sessions` section. Simply enter a name and hit `Create new app password` - [Click here for the full documentation][docs] -![screenshot][image] +![Nextcloud Backup Screenshot][image] [buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg [buymeacoffee]: https://www.buymeacoffee.com/seb6596 diff --git a/nextcloud_backup/DOCS.md b/nextcloud_backup/DOCS.md new file mode 100644 index 0000000..3a5dccb --- /dev/null +++ b/nextcloud_backup/DOCS.md @@ -0,0 +1,75 @@ +## Installation + +The installation of this add-on is pretty straightforward and not different in +comparison to installing any other Hass.io add-on. + +1. [Add our Home Assisant add-ons repository][repository] to your HassOS instance. +1. Install the "Nextcloud Backup" add-on. +1. Start the "Nextcloud Backup" add-on +1. Check the logs of the "Nextcloud Backup" add-on to see if everything went well. +1. Open the web UI for the "Nextcloud Backup" to configure the add-on. + +> **NOTE**: Do not add this repository to HassOS, please use: `https://github.com/Sebclem/sebclem-hassio-addon-repository`. + + +## NextCloud config + +First, you need to configure all your Nextcloud information. + +1. Open the add-on Web UI +1. Open NextCloud config menu (Top right gear, and Nextcloud) +1. If your NextCloud instance uses `HTTPS`, enable the `SSL` lever +1. Enter the `hostname` of the NextCloud instance. You can specify a custom port by adding `:[port]` at the end of the hostname (`exemple.com:8080`) +1. Now enter the Nextcloud username that you would like this add-on to use. +1. For the password, we highly recommend using an `App Password`. + + >To generate a `App Password`, go into your personal setting into Nextcloud, Security page. You can generate one via the `Devices & sessions` section. Simply enter a name and hit `Create new app password`. +1. You can change the backup directory in Nextcloud. Default is `/Hassio Backup/`. + +## Backup config +You can now configure the automatic backup. + +1. Open the add-on Web UI +1. Open Backup config menu (Top right gear, and Backup) +1. Specify the backup naming template, this will define how your backup will be named. + On this field, you can use some variables that are documented [here][variable_doc]. + The default value is `{type}-{ha_version}-{date}_{hour}`. +1. If you want to protect your backup with a password, enable `Password Protected` and specify the password. +1. You can now choose witch folder and add-on you want to include in your backup. +1. Now select the backup frequency. +1. You can finally enable Auto clean for Local Snapshot (Snapshot in Home Assistant) and Nextcloud Backups. + If enabled, you can specify how much Local Snapshot and Nextcloud Backup you want to keep before deleting the older one. +> __Info:__ +> Auto Clean is executed after every upload and every day at 00h30 +## Home Assitant Os Configuration + +**Note**: _Remember to restart the add-on when the configuration is changed._ + +Example add-on configuration: + +```json +{ + "log_level": "info" +} +``` + +### Option: `log_level` + +The `log_level` option controls the level of log output by the addon and can +be changed to be more or less verbose, which might be useful when you are +dealing with an unknown issue. Possible values are: + +- `trace`: Show every detail, like all called internal functions. +- `debug`: Shows detailed debug information. +- `info`: Normal (usually) interesting events. +- `warning`: Exceptional occurrences that are not errors. +- `error`: Runtime errors that do not require immediate action. +- `fatal`: Something went terribly wrong. Add-on becomes unusable. + +Please note that each level automatically includes log messages from a +more severe level, e.g., `debug` also shows `info` messages. By default, +the `log_level` is set to `info`, which is the recommended setting unless +you are troubleshooting. + +[variable_doc]: https://github.com/Sebclem/hassio-nextcloud-backup/blob/master/nextcloud_backup/namin_template.md +[repository]: https://github.com/Sebclem/sebclem-hassio-addon-repository diff --git a/nextcloud_backup/README.md b/nextcloud_backup/README.md index 23ca06b..48dd0ee 100644 --- a/nextcloud_backup/README.md +++ b/nextcloud_backup/README.md @@ -1,40 +1,29 @@ # Home Assistant Add-ons: Nextcloud Backup +![Nextcloud Backup Logo](logo.png) [![Release][release-shield]][release] ![Project Stage][project-stage-shield] ![Project Maintenance][maintenance-shield] -[![Community Forum][forum-shield]][forum] - [![Buy me a coffee][buymeacoffee-shield]][buymeacoffee] + ## About Easily backup your Home Assistant snapshots to Nextcloud. -Auto backup can be configured via the web interface. ### Features -- Auto Backup : Configure this add-on to automaticly backup your HassIO instance. -- Auto Clean : You can specify the maximum number of local snapshots and (__ONLY__) auto backed-up snapshots. -- Upload backed-up snapshot to Home assistant. -> __Info:__ -> Auto Clean is executed after every upload and every day at 00h30 - -## NextCloud config - -First, you need to configure all your Nextcloud information. - -To do this: -1. Open the add-on Web UI -1. Open NextCloud config menu (Top right gear, and Nexcloud) -1. If your NextCloud instance uses `HTTPS`, enable the `SSL` lever -1. Enter the `hostname` of the NextCloud instance. You can specify a custom port by adding `:[port]` at the end of the hostname (`exemple.com:8080`) -1. Now enter the Nextcloud username that you would like this add-on to use. -1. For password, we highly recommend using an `App Password`. - - >To generate a `App Password`, go into your personal setting into Nextcloud, Security page. You can generate one via the `Devices & sessions` section. Simply enter a name and hit `Create new app password`. +- __Auto Backup__ : Configure this add-on to automatically backup your HassIO instance +- __Selective Backup__ : You can specify witch folder and add-on you want to backup. +- __Password protected Backup__ : this add-on can use the Home Assistant snapshot encryption. +- __Auto Clean__ : You can specify the maximum number of local snapshots and (__ONLY__) auto backed-up snapshots. +- __Restore__ : Upload backed-up snapshot to Home assistant. +- __Web UI__ : All the configuration is based on an easy-to-use web interface, no yaml needed. [Click here for the full documentation][docs] +![Nextcloud Backup Screenshot](../images/screenshot.png) + + [buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg [buymeacoffee]: https://www.buymeacoffee.com/seb6596 @@ -42,6 +31,6 @@ To do this: [forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg [forum]: https://community.home-assistant.io/ [maintenance-shield]: https://img.shields.io/maintenance/yes/2021.svg -[project-stage-shield]: https://img.shields.io/badge/project%20stage-developpement-yellow.svg +[project-stage-shield]: https://img.shields.io/badge/project%20stage-Beta-red.svg [release-shield]: https://img.shields.io/github/release/Sebclem/hassio-nextcloud-backup.svg [release]: https://github.com/Sebclem/hassio-nextcloud-backup/releases diff --git a/naming_template.md b/nextcloud_backup/naming_template.md similarity index 100% rename from naming_template.md rename to nextcloud_backup/naming_template.md diff --git a/nextcloud_backup/rootfs/opt/nextcloud_backup/views/modals/backup-settings-modal.ejs b/nextcloud_backup/rootfs/opt/nextcloud_backup/views/modals/backup-settings-modal.ejs index 0b83a4f..b25af8b 100644 --- a/nextcloud_backup/rootfs/opt/nextcloud_backup/views/modals/backup-settings-modal.ejs +++ b/nextcloud_backup/rootfs/opt/nextcloud_backup/views/modals/backup-settings-modal.ejs @@ -14,7 +14,7 @@ You can find all available variables + href="https://github.com/Sebclem/hassio-nextcloud-backup/blob/master/nextcloud_backup/naming_template.md"> here @@ -135,13 +135,13 @@
+ Backups
- +