Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geek-md/homebridge-config-backup-shell-script
Bash script used to automate local backup of config.json of a Homebridge instance runing inside a Docker container
https://github.com/geek-md/homebridge-config-backup-shell-script
cron docker homebridge shell-script
Last synced: about 1 month ago
JSON representation
Bash script used to automate local backup of config.json of a Homebridge instance runing inside a Docker container
- Host: GitHub
- URL: https://github.com/geek-md/homebridge-config-backup-shell-script
- Owner: Geek-MD
- License: mit
- Created: 2022-11-15T05:10:58.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-28T21:05:34.000Z (about 2 years ago)
- Last Synced: 2024-11-01T08:42:09.197Z (3 months ago)
- Topics: cron, docker, homebridge, shell-script
- Language: Shell
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Homebridge Config Backup Shell Script
This is a bash script that allows you to automate local backup of *config.json* of a Homebridge instance runing inside a Docker container.With v1.2.1, this script implements unix-like command structure, so if you want to use a working directory different from default one, you must use ***-d*** option along with the path to that directory.
Things to do after dowloading script
- Make shell script executable runing "chmod u+x homebridge-config-backup.sh"
- Edit cron with "crontab -e" command and add the subsequent line at the end, replacing ** with the location where you stored *homebridge-config-backup.sh*, and ** with the directory where backups will be stored, without *$HOME* path.> 0 * * * * bash //homebridge-config-backup.sh -d
- Save cron using Ctrl-O
- Exit editor with Ctrl-X
- Reboot so changes take effectThe cron example will run the script every hour. The script will attempt to copy *config.json* from Homebridge docker container to local storage, check if md5sum of copied file and existing backup are equal or different. If md5sum is different, the script will create a backup including md5sum in the name of the file, and write down the result of the task on a log file, so you can check the timeline of all the backups.
Obviously you can change the time interval at wich the script runs modifying the cron command. I recomend https://crontab.guru to do that.