Ga naar de inhoud
Home » Migrate 2 new OS on Pi

Migrate 2 new OS on Pi

Raspberry Pi Blog Header

Pi is vpn.thuis.net

Start with … Backup

dhcpcd

Copy /etc/dhcpcd/dhcpcd.conf and directory /etc/dhcp ?????

Domoticz

 

Pihole:

Create a backup of Pihole using Teleporter

  • Access Web Interface
  • Use Teleporter to create a backup: Go to Settings -> Teleporter and click Backup to create a .tar.gz file containing your settings. Save the File: Download this backup file to your computer.
    • You can also use Teleporter on the command line: pihole-FTL –teleporter
  • Copy Manual Files: If you have custom DNS settings or specific configurations in /etc/dnsmasq.d, manually copy these files to your computer as well.

Pi Alert

Backup

  • /opt/pialert/db/*.db
  • /opt/pialert/config/setting_*
  • /opt/pialert/config/pialert.conf

WireGuard (VPN)

Backup /etc/wireguard

Insert the new SD with the new PiOS

Start Restore:

 

dhcpcd

 

Domoticz

 

Pihole

Install Pi-hole: Perform a fresh installation of Pi-hole on your new server.

curl -sSL https://install.pi-hole.net | bash

Assign Static IP: Ensure the new server has a static IP address, ideally the same one as the old server if possible.

Import Backup: Access the new Pi-hole’s web interface, go to Settings > Teleporter, and use the Restore option to upload your backup file.
Restore Manual Files: Copy any custom files from /etc/dnsmasq.d to the new server’s /etc/dnsmasq.d directory.
Reconfigure (if IP changed): If the IP changed, run pihole -r and select Reconfigure, then update your network interface and IP settings.
Copy Long-Term Data (Optional): For historical data, manually copy the pihole-FTL.db file from the old server to the new one (stop services on both first

 

Pi Alert

Install new PiAlert

sudo bash -c "$(wget -qLO - https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_install.sh)"

Restore the files you backedup

  • /opt/pialert/db/*.db
  • /opt/pialert/config/setting_*
  • /opt/pialert/config/pialert.conf

Set the permissons:

sudo chgrp -R www-data "/opt/pialert/db"
sudo chmod -R 775 "/opt/pialert/db"
sudo chmod -R 775 "/opt/pialert/db/temp"
sudo chgrp -R www-data "/opt/pialert/config"
sudo chmod -R 775 "/opt/pialert/config"

Goto Web Interface and check if it is running

WireGuard

Install wireguard

apt install wireguard

Restore the backup directory /etc/wireguard