NAS08 serves as a Pi-Hole DNS server, nginx proxy server, Vaultwarden Server, Plex server, as well as an OpenMediaVault Nas Server
The goal is to create regular maintenance to the ZFS pools for this NAS. This is done to protect and keep the pools healthy.
Keep a copy of this document on your workstation, a USB drive, or in print. If NAS08 is down you cannot read files stored on it.
This script gets the current ZFS pool status and reports it back to the administrator via email. Use these commands to setup the scripts on the NAS.
ssh rufusking@192.168.150.35 sudo mkdir /usr/scripts/zfs sudo nano nas08_zfs_report.sh
nas08_zfs_report.sh
chmod +x /usr/scripts/zfs/nas08_zfs_report.sh
sudo /usr/scripts/zfs/nas08_zfs_report.sh
Watch for the report in your inbox
This script initiates a ZFS pool scrub and reports back the status to the administrator via email. Use these commands to setup this script on the NAS.
ssh rufusking@192.168.150.35 sudo mkdir /usr/scripts/zfs sudo nano nas08_zfs_scrub.sh
nas08_zfs_scrub.sh
chmod +x /usr/scripts/zfs/nas08_zfs_scrub.sh
sudo /usr/scripts/zfs/nas08_zfs_report.sh
Watch for the report in your inbox
| Area | NAS08 | NAS16 |
|---|---|---|
| Primary role | Docker containers (Pi-hole, Plex, Vaultwarden, Nextcloud, NPM) | Web server (Apache/PHP), databases (MariaDB), Webmin admin |
| What's backed up beyond /etc + OMV | Docker Compose files, Pi-hole data, Plex config/metadata | Apache vhosts, PHP config, MariaDB dumps, Webmin config |
| Website files | N/A | Intentionally excluded โ stored on NAS drives, covered by redundancy |
| Database backup | None (no databases) | Full mysqldump of all user databases, .sql.gz per database |
| Backup destination | /export/kingdezigns-all/Backups/NAS08/ | /export/kingdezignsnas-16/Backups/NAS16/ |
| ZFS pool name | kingdezignsnas | kingdezignsnas-16 (assumed โ verify with sudo zpool list) |
| Recovery phases | 9 phases, 34 steps | 10 phases, 40 steps |
The script was written based on information provided and follows Raspberry Pi OS / Debian conventions. Verify the following on NAS16 before treating any backup as production-ready.
| Item | Assumed value | How to verify |
|---|---|---|
| ZFS pool name | kingdezignsnas |
sudo zpool list |
| Backup destination path | /export/kingdezigns08/Backups/NAS08/ |
ls /export/ โ confirm share name matches |
| MariaDB auth method | Uses /etc/mysql/debian.cnf (maintenance account, no password when run as root) |
Run: sudo mysql --defaults-file=/etc/mysql/debian.cnf -e "SHOW DATABASES;" โ should work without password |
| PHP version(s) | Auto-detected from /etc/php/*/ |
php -v and ls /etc/php/ |
| Apache config location | /etc/apache2/ (standard Debian) |
apache2 -V โ confirms config path |
| Webmin config location | /etc/webmin/ |
ls /etc/webmin/ |
| Item | Old value | New value |
|---|---|---|
| NAS16 โ Backup status | None |
Automated โ every 3 days โ 30-day retention |
| NAS16 โ Backup destination | None |
/export/kingdezignsnas-16/Backups/NAS16/ |
| NAS16 โ Backup script | None |
/usr/scripts/omv/nas16-backup.sh |
| NAS16 โ PCIe requirement | not documented |
dtparam=pciex1 + dtparam=pciex1_gen=3 required in /boot/firmware/config.txt on fresh OS |
| NAS16 โ Web stack | not documented |
Apache ยท PHP ยท MariaDB ยท Webmin ยท Adminer |
| NAS16 โ Recovery plan | None |
NAS16-Backup-Summary.html โ 40 steps across 10 phases + ZFS troubleshooting |