The target for the device is a low-power daily backup device that is robust enough to survive electrical blackouts and simple enough so that it can be duplicated for redundancy when needed.
- Wake up from suspend
- Update e-ink display with message backup started + TIMESTAMP
- Send heartbeat information to a remote server
- Check that hardware is OK
- RSYNC databases
- RSYNC images
- BACKUP Github repositories
- Mount storage disk as read-only
- Check using checksums that data was copied correctly
- Update e-ink display with message backup was successfully finished + TIMESTAMP
- Suspend for 24h and goto #1
- Odroid M1 8GB (documentation: Odroid wiki)
- KKSB Odroid M1 Case
- KKSB 12mm Push Button Momentary Power Switch
- 12V/2A power supply EU plug
- CR 2032 RTC Battery
- 128GB eMMC Linux Module for Odroid M1 (boot & root drive)
- Odroid M1 SATA Mount and Cable Kit (documentation: Odroid wiki)
- Samsung PM897 2.5" SSD 3.84TB (storage drive)
- OPT1 WD Black SN850X nvme 4TB (secondary storage drive (Btrfs RAID-1), without heatsink)
- OPT2 Intel 1600x 118GB (work drive if Btrfs RAID1 is not used)
- Badger 2040 (eink display)
- USB-A (Male) to USB-C Cable
- APC PM5U-GR (surge protector)
- m.2 screw is using very small phillips screwdriver head
- eMMC card needs to be installed before board is installed to KKSB case as there is no room for fingers next to eMMC slot when it is in place
- Odroid M1 SATA Mount and Cable Kit screws are too long for attaching SSD:st to plate with some drives and additional screws are needed. For example Samsung PM897 screwholes are shorter than screws.
- Board with default OS (emmc with Ubuntu 20.04 ) average power consumption was ~3.5W (2.1.2022)
- Board with Ubuntu 22.04 via Petiboot (emmc, commandline only) average power consumption was ~4W (2.1.2022)
- Board with Debian bullseye install via Petiboot (emmc+Samsung 970 EVO Nvme) 8.4W max (4.1.2022)
- Board with Debian bullseye installed via Petiboot (emmc+Samsung PM897 2.5" SSD ) 4.7W max (21.1.2022)
- Board with Ubuntu 22.04 via Petiboot (emmc+Samsung PM897, commandline only) average power consumption was 5.7W (21.1.2022)
- Board with Debian GNU/Linux 11 (bullseye) (emmc+Samsung PM897 2.5" SATA+ 970 EVO Nvme + Badger eink) 4.86 W idle (20.10.2024)
- Board with Debian GNU/Linux 12 (bookworm) (emmc+Intel 1600x 118GB nvme) idle: 5.3W, load 8W (20.10.2024)
- Board with Debian GNU/Linux 12 (bookworm) (emmc+Intel 1600x 118GB nvme + PM897 SATA) idle: 6.5W (20.10.2024)
- Board with Ubuntu 24.04.1 LTS (emmc+Intel 1600x 118GB nvme + PM897 SATA) idle: 6.53 W, with HDMI: 6.96W (20.10.2024)
- Board with Debian GNU/Linux 12 (emmc+ WD Black SN850X nvme + PM897 SATA) idle: 6.43W, with HDMI: 7W (21.10.2024)
- Debian GNU/Linux 12 (installable via Petiboot netboot installer)
- Odroid default OS Ubuntu 20.04 : Ubuntu Kernel 4.19
- Armbian stable 22.11 with 6.1.y - (Odroid forum) (uses mainline kernel, doesn't support emmc?)
- Ubuntu 22.04 with 5.18 kernel (installable via Petiboot netboot installer)
- Btrfs + snapshots + optionally two data copies for self-healing
sudo apt-get install python3-venv
source venv/bin/activate
pip install mpremote
mpremote exec "import badger2040; badger=badger2040.Badger2040();badger.pen(0);badger.text('Testing ...', 20,20);badger.update()"
Information in the display
- Date/time
- Local IP address
- Internet access state (OK/FAIL)
- Ssh server state (OK/FAIL)
- State: "START
- Date/time
- Local IP address
- Internet access state (OK/FAIL)
- Ssh server state (OK/FAIL)
- State: "FAILED (NUMBER)"
- Date/time
- Local IP address
- State: "BACKUP READY, SLEEPING..."
cat file.gz | gpg --encrypt --batch --cipher-algo AES256 --compress-algo none -r b763e320fe05cc67744d8353d88eb927 -o file.gz.enc --trusted-key b763e320fe05cc67744d8353d88eb927
gpg --output private.pgp --armor --export-secret-key b763e320fe05cc67744d8353d88eb927
On target machine
scp username@source.org:/home/backup/private.pgp /home/restore/private.gpg
scp username@source.org:/home/backup/file.gz.enc /home/restore/file.gz.enc
gpg -o private.gpg --export-options backup --export-secret-keys
gpg --decrypt file.gz.enc |gzip -t