Add a smartphone power bank as UPS. Simple, cheap and sufficient. It avoids the need for OH restarts every time you or someone else hit the breakers or earth (ground) cable. I stopped counting how often that happened in my house over the last year.
Moving away everything from SD card is possible but don’t focus on that, it has drawbacks, too, and even if done properly, it’s not sufficient.
What’s much more important is a plan for quick recovery. See my recent post here and also this old one.
I used pretty simple USB power bank, which I even got for free as a present while visiting some exhibition. It has a logo of that company, so I have no idea who is original manufacturer. It has a micro-USB and USB ports.
@Artyom_Syomushkin how is it going? I want to start openHAB / openHABian on a Raspberry Pi 3. The third Pi can be run w/o a SD-Card and the older models (except the first with full SD Card) just need the file “bootcode.bin” on the internal SD-Card . I am running dnsmasq on a Pi 1 and NFS on my other Debian Server. I want to use my new Pi diskless with openHABian - I hope this combination will not interfere.
@chris400 since I didn’t want to start from new installation, I simply followed couple of first instructions, disabled swap file and created tmpfs for logs. I adjusted logback.xml to keep only 10 days of records maximum_ so that it fits into RAM. The only one log - events is backup to my NAS every weekend.
Finally I see that SD card is not used so often anymore, so I guess it should survive relatively long.
I’m writing here to say that i had a weird sd failure even if the raspberry pi v3 was powered by a battery pack. I flashed the sd more than one year ago. During this period some unwanted shutdown did occur anyway due to “human error”. I restored a backup (that is performed daily automatically on a synology) and now everything seems to work.
In my case the pi was losing ethernet connectivity and it was causing also the access point to hang. This made me suspect of an hardware failure first, but by using a different raspberry i ended up concluding that it was sds fault.
Whats strange is that i restored a backup taken after the first symptoms of ethernet hang showed up. If file was corrupted, the backup would simply copy it to the new sd.
This is a message in bottle for other users who may experience some trouble in the future.
@Lionello_Marrelli Hi Lionello,
I am folowing this thread because i would like to backup my openHAB system (SSD drive with Power bank) via nfs to my Synology NAS. (i still have to create a bu power solution for my network switches…)
I noticed that nfs on Synology does not work like the default nfs specs. They made their own additions to this. Til now, i haven’t got this working…
Tried several solutions like raspiBackup but no success…
If you are using nfs with your backup solution, could you please share your solution?
I would greatly appreciate it.
Kind regards, Bert
@deltabert Hi Bert,
I am using raspiBackup on a Synology NAS mounted via NFS (by editing the \etc\fstab).
I had to play with NFS settings on the Synology (but I followed suggestions on a forum on Synology). NFS is essential as it allows mapping permissions and hard-links, considerably reducing the storage size of incremental backups.
in the last versions raspiBackup is more strict in checking for errors. If an error occur the entire backup fails. I added these errors to the ignore list.
You have to solve the NFS issue first.
On the raspberry side I modified my /etc/fstab as follows
On the synology side, I followed instructions of the following link (it is in italian but you can easily find the english one).
In my case I opened the synology to my local network with
NFS can be painful to setup, ma once in place it works pretty well.
If you use openHABian, the recommendation is to use Amanda. It’s a preconfigured backup solution to come bundled with openHABian. Install it from the openhabian-config menu.
If you didn’t use the openHABian image, openHABian is also available as a set of scripts you could also install on top of an existing Raspbian.
Hi @Lionello_Marrelli and @mstormi, Thank you for your reactions.
Lionello, i am going to give raspiBackup an other try. I sure would like to use nfs for the back-up because of its file oriented mechanism.
I did found that the user group permissions on Synology where giving me problems.
With regard to the Synology link you gave me, that is also in English and even Dutch available.
But with regard to the NFS Permissions, what did you configure by Sicurezza:? I used AUTH_SYS: but that did not help.
Markus, I am indeed using openhabian. And i noticed the Amanda backup solution in the openhabian-config script. I did try it, but it looks so complicated… As if it’s a relic from the time i was working with mainframes And again, i have to use nsf, so i’l be having the same problem.
I do use cifs with my RPi’s on my nas (for Visual Studio Code), but the README for Amanda has an example which uses nfs, so… Besides, the README explicitly tells that CIFS is no option because of issues with symlinks…
I actually set AUTH_SYS. But there are many things that can go wrong.
I suggest you to open a new thread. It is better not to hijack this thread. I think it could be useful for other people and easier to find.
Concerning the choice of the backup, I actually found raspiBackup before the openhabian and
Amanda availability. It took me a while to set it up: it works now but there is always some risk that the developer stops maintaining it. If I had to start now, I would follow openhab2 community recommendations. Amanda looks old but it is still used for serious backups in private companies, while raspiBackup is nothing more than a well done bash script built around rsync by a skilled user. For a simple raspberry, amanda may look overkill but once all of the complexities are hidden by a good installer and a good documentation it is ok. Moreover what will happen a few years from now? Which backup solution will remain in place?
In any case, we can continue discussing in your new thread.
Yes please, this thread is about SD card and its corruption.
For your specific problem to mount NFS off your Synology it is not OH related so you better go google that or look into a Synology forum.
There’s already many threads on OH backup solutions in the forum. Go search first. I wouldn’t think there’s the need to open another one. RaspiBackup isn’t anything official or bundled with OH or openHABian so if you want support on that you would also need to go google elsewhere.
Amanda on the other hand is part of openHABian.