<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/raspberry-pi-sd-failure-and-backing-up-zwavejs2mqtt-dd1hbfpmf" -->

---
title: Raspberry Pi SD Failure, and Backing Up ZWaveJS2MQTT
description: A Raspberry Pi running ZWaveJS2MQTT suffered an SD card failure, taking down a Z-Wave home automation network. The post covers recovering the setup with a...
canonical: https://daily.dev/posts/raspberry-pi-sd-failure-and-backing-up-zwavejs2mqtt-dd1hbfpmf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Raspberry Pi SD Failure, and Backing Up ZWaveJS2MQTT | daily.dev
og:description: A Raspberry Pi running ZWaveJS2MQTT suffered an SD card failure, taking down a Z-Wave home automation network. The post covers recovering the setup with a...
og:url: https://daily.dev/posts/raspberry-pi-sd-failure-and-backing-up-zwavejs2mqtt-dd1hbfpmf
og:image: https://api.daily.dev/og/posts/dd1hBfpMF.png
og:image:alt: Raspberry Pi SD Failure, and Backing Up ZWaveJS2MQTT
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Raspberry Pi SD Failure, and Backing Up ZWaveJS2MQTT

**[apalrd's adventures](https://daily.dev/sources/apalrd)** · 4 min read · 0 upvotes · 0 comments

## Summary

A Raspberry Pi running ZWaveJS2MQTT suffered an SD card failure, taking down a Z-Wave home automation network. The post covers recovering the setup with a fresh SD card, reinstalling ZWaveJS2MQTT via Snap, and implementing a daily cron-based backup script that tars the snap store folder to a NAS via autofs. It also touches on reducing SD card wear by moving logs to tmpfs.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.apalrd.net/posts/2021/raspi_hardening>

## Questions this post answers

### Where is the ZWaveJS2MQTT data stored when installed via Snap on Raspberry Pi?

When ZWaveJS2MQTT is installed as a Snap package, its store data is kept at /var/snap/zwavejs2mqtt/current. Backing up this directory preserves node metadata and configuration. Note that core Z-Wave network parameters are stored on the Z-Wave dongle itself, so devices do not need to be re-paired after a reinstall — only local metadata like node names is lost.

_Hobbyists managing Z-Wave setups on Raspberry Pi share recovery tips and backup strategies on daily.dev._

### How do I set up a daily cron job to back up a directory on Raspberry Pi to a NAS?

Mount the NAS share via autofs to a local path (e.g. /mnt/backup), write a shell script that tars the target directory into a day-of-week-named .tar.gz file, then add it to root's crontab with: 0 0 * * * bash /mnt/backup/backup.sh. This runs at midnight every day and rotates through seven files, keeping roughly a week of backups.

_Raspberry Pi self-hosters working through backup automation find practical scripts and setups on daily.dev._

## Similar posts on daily.dev

- [The death and rebirth of my home server](https://daily.dev/posts/the-death-and-rebirth-of-my-home-server-dfkvsryip) · Hacker News · 3 upvotes · 0 comments
- [My Raspberry Pi now fixes itself when services die, and I haven't SSHed in weeks](https://daily.dev/posts/my-raspberry-pi-now-fixes-itself-when-services-die-and-i-haven-t-sshed-in-weeks-vadmi1qoi) · XDA Developers · 2 upvotes · 1 comments
- [I gave an old Raspberry Pi one job, and it's been running untouched for a year](https://daily.dev/posts/i-gave-an-old-raspberry-pi-one-job-and-it-s-been-running-untouched-for-a-year-zin4auwfy) · XDA Developers · 0 upvotes · 0 comments
- [More random home lab things I've recently learned](https://daily.dev/posts/more-random-home-lab-things-i-ve-recently-learned-e7ucih6lp) · Hacker News · 10 upvotes · 0 comments
- [Self-Host Weekly \#148: Maintenance Mode](https://daily.dev/posts/self-host-weekly-148-maintenance-mode-jufihqwu0) · selfh.st · 4 upvotes · 1 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#raspberry-pi](https://daily.dev/tags/raspberry-pi)

[View this post on daily.dev](https://daily.dev/posts/raspberry-pi-sd-failure-and-backing-up-zwavejs2mqtt-dd1hbfpmf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Raspberry Pi SD Failure, and Backing Up ZWaveJS2MQTT","url":"https://daily.dev/posts/raspberry-pi-sd-failure-and-backing-up-zwavejs2mqtt-dd1hbfpmf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/raspberry-pi-sd-failure-and-backing-up-zwavejs2mqtt-dd1hbfpmf"},"datePublished":"2026-08-11T08:56:47.891Z","dateModified":"2026-08-11T09:29:52.789Z","description":"A Raspberry Pi running ZWaveJS2MQTT suffered an SD card failure, taking down a Z-Wave home automation network. The post covers recovering the setup with a...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","isAccessibleForFree":true,"articleSection":"apalrd's adventures","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"apalrd's adventures","logo":"https://media.daily.dev/image/upload/s--4zkx8dRj--/f_auto,q_auto/v1786438309/logos/apalrd?_a=BAMAMicg0","url":"https://daily.dev/sources/apalrd"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/raspberry-pi-sd-failure-and-backing-up-zwavejs2mqtt-dd1hbfpmf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,raspberry-pi","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"apalrd's adventures","item":"https://daily.dev/sources/apalrd"},{"@type":"ListItem","position":3,"name":"Raspberry Pi SD Failure, and Backing Up ZWaveJS2MQTT"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/raspberry-pi-sd-failure-and-backing-up-zwavejs2mqtt-dd1hbfpmf#faq","mainEntity":[{"@type":"Question","name":"Where is the ZWaveJS2MQTT data stored when installed via Snap on Raspberry Pi?","acceptedAnswer":{"@type":"Answer","text":"When ZWaveJS2MQTT is installed as a Snap package, its store data is kept at /var/snap/zwavejs2mqtt/current. Backing up this directory preserves node metadata and configuration. Note that core Z-Wave network parameters are stored on the Z-Wave dongle itself, so devices do not need to be re-paired after a reinstall — only local metadata like node names is lost. Hobbyists managing Z-Wave setups on Raspberry Pi share recovery tips and backup strategies on daily.dev."}},{"@type":"Question","name":"How do I set up a daily cron job to back up a directory on Raspberry Pi to a NAS?","acceptedAnswer":{"@type":"Answer","text":"Mount the NAS share via autofs to a local path (e.g. /mnt/backup), write a shell script that tars the target directory into a day-of-week-named .tar.gz file, then add it to root's crontab with: 0 0 * * * bash /mnt/backup/backup.sh. This runs at midnight every day and rotates through seven files, keeping roughly a week of backups. Raspberry Pi self-hosters working through backup automation find practical scripts and setups on daily.dev."}}]}
```

