Hi folks,
47 in April; not a April joke! ;-)
Hi folks,
47 in April; not a April joke! ;-)
Hi, @strawberry-3-141 , i’m missing something in your code.
Where is the second curved bracket? Is somewhere more code?
@bocapie
Hi, that’s a part of my config.js with the trafic module for you as an example.
{
"module": "MMM-Traffic",
"position": "top_left",
"header": "YourHeaderName",
"classes": "bright small",
"config": {
"api_key": "xxxxxxxxxYourApiKeyxxxxxxxxxx",
"mode": "driving",
"language": "de",
"show_summary": "true",
"origin": "YourStartLocation",
"destination": "YourDestinationLocation",
"arrival_time": "0700",
"route_name": "YourRouteName",
"changeColor": true,
"showGreen": false,
"limitYellow": 5,
"limitRed": 20,
"traffic_model": "pessimistic",
"interval": 120000
}
},
sudo nano /home/pi/Backup.sh
#!/bin/bash
# VARIABLEN - HIER EDITIEREN
BACKUP_PFAD="/yourBACKUPpath"
BACKUP_ANZAHL="5"
BACKUP_NAME="raspicam3-HN_BMGT"
DIENSTE_START_STOP="service mysql"
# ENDE VARIABLEN
# Stopp any services before backup
${DIENSTE_START_STOP} stop
# Create backup with dd in your desired path
dd if=/dev/mmcblk0 of=${BACKUP_PFAD}/${BACKUP_NAME}-$(date +%Y%m%d-%H%M%S).img bs=1MB
# Star services after backup
${DIENSTE_START_STOP} start
# Delete old backup after X backups
pushd ${BACKUP_PFAD}; ls -tr ${BACKUP_PFAD}/${BACKUP_NAME}* | head -n -${BACKUP_ANZAHL} | xargs rm; popd
Make executable and move the script to /usr/bin/
sudo chmod 755 /home/pi/Backup.sh
sudo mv /home/pi/Backup.sh /usr/local/bin/Backup.sh
crontab -e
00 01 * * * /usr/local/bin/Backup.sh
Every day at 01:00 in the night a backup with crontab.
Restore your Backup to your SD-Karte under Windows with Win32 Disk imager or with Linux with following command.
dd if=/path/backup.img of=/dev/sda bs=1MB
create manual a backup with your pi
sudo dd if=/dev/mmcblk0 of=/yourBACKUPpath/Rpi_32gb_backup.img bs=2M