![]() ![]() If you like our projects, you might consider signing up to Bluehost, because you’ll be supporting our work. This is what makes this project interesting: you’ll be able to go your domain name () and see your ESP32-CAM photos. When buying a hosting account, you’ll also have to purchase a domain name. Get Hosting and Domain Name with Bluehost » If you don’t have a hosting account, I recommend signing up for Bluehost. I recommend choosing the unlimited websites option Note that any hosting service that offers PHP will work with this tutorial. ![]() Bluehost (user-friendly with cPanel): free domain name when you sign up for the 3-year plan.If I need to restore, I simply restore the image taken from win32diskimager, then boot up the RPi and use WinSCP to transfer the full backup image to the /tmp directory on the RPi then run openhab-cli restore /tmp/*backup-image* to restore. Can do a sudo crontab -l to check the entry exists.įor an image of the whole O/S (which I generally do before/after large upgrades) I just do what many do and shutdown OH, insert the SD card into my USB card reader and run win32diskimager and take a backup image. Optionally, use cron to schedule it to run whenever you want:Īdd the following to the end of the cron file to, for example, schedule this to run every week at 3am.ĬTRL X and save. Test the script by running it manually from the command line (ignore the error the first time you run, as it attempts to remove the backup image kept locally on the RPi before creating a new one then FTP’ing it off to the NAS)Ĭheck the file exists under /var/lib/openhab2/backups and also has been FTP’d to your server successfully. Change ownership and permissions to execute. Zipfile=( /var/lib/openhab2/backups/*.zip )Ĭurl -T /var/lib/openhab2/backups/*.zip -user ftpuser:mypasswordĬTRL X and save. As I keep my scripts under /home/pi folder as well, I also add these to the ZIP file once the OH backups is complete (if you don’t want this, omit the lines zipfile=… to sudo zip…) #!/bin/bash Paste the following contents into the new file, obviously changing “192.168.1.100” to be the IP of your FTP server, and ftpuser and mypassword as the login details that have write access. ![]() ![]() On the RPi, first install zip and curl if not already installed (“sudo apt-get update” first if necessary) sudo apt-get install zipĬreate a script to do a full backup and FTP it off to the NAS: cd /home/pi For this example, create a folder called “ohbackup” off the root of the FTP server. This assumes you have setup your NAS (or whatever you use) as an FTP server and have tested successful login and password for it and sending an image to it. I run OH on a Raspberry Pi, so instructions are specifically for this. I also use it as a backup repository for Openhab (using the FTP server on it) Here’s a super quick and easy backup script I wrote to utilise the built-in openhab-cli backup utility then ftp the image off to the NAS. In my case, I run a QNAP NAS at home with a heap of disk storage primarily for my PC data backups. This example simply gets that backup off your Rpi and onto alternate media by way of a very simple script. It’s all well and good having a backup of OpenHAB, but unless it’s sitting on alternate media (as opposed to ON the same media as Openhab is running) then it’s not really that safe, if your disk dies (and SD cards on RPi’s especially tend to have a limited number of writes) then you can kiss your backup images goodbye. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |