Author Topic: Installing new version - Linux 'fun' and backups  (Read 1632 times)

RobertPBham

Installing new version - Linux 'fun' and backups
« on: July 08, 2019, 11:21:56 pm »
Hi all,

I've been meaning to upgrade to the latest version for a week or so and this weekend I finally found the time to do it. As part of the upgrade, I wanted to backup my configuration and track files and transfer them to the new install. I also explored a way of backing up the whole SD card before wiping it (just in case). This was all performed in a Ubuntu virtual machine running within VMware Workstation and mapping the SD card through. It is not a step by step guide and you need to understand Linux as if you don't, you can do more damage than you can think is possible, but may help someone if they are experimenting (enjoy messing about) like I do:

VMware Workstation
Ubuntu Virtual machine
Plug in SD card and pass through to Ubuntu virtual machine
Copy root | root | cache folder to PAW_Backup on desktop
Copy root | root | servers | PilotAware.cfg file to PAW_Backup on desktop
Unmount SD card from Ubuntu virtual machine
*Make a backup of the SD card
Terminal
sudo apt install pv
Ascertain current disk mappings
df -h
Mount SD card to Ubuntu virtual machine
Ascertain PAW SD card disk mapping
df -h
sudo dd if=/dev/sdb* | pv | gzip > /home/*user*/Desktop/PAW_Backup/PAW_SD_Card_Backup.img.gz   
*represents SD card drive mapping and location specific to your setup
The backup can take a fair while dependent on SD card size - mine was 32GB and compressed to 612MB with gzip - it also takes longer due to copying all information (including empty space) and the mapping through to the virtual machine delays things further
Unmount SD card from Ubuntu virtual machine
Wipe SD card as per PAW instructions and install new version

Mount new SD card to Ubuntu virtual machine
Terminal
Change directory to /home/*user*/Desktop/PAW_Backup/cache folder
sudo cp -R * /root/root/cache - you need sudo for permissions to transfer the files
You can either copy the PilotAware.cfg file using a command similar to above to the correct location or I used sudo nano to modify the PilotAware.cfg file on the SD card and just add the WIFI configuration - my license had just expired so I didn't copy that information and just applied the new license details within the PAW configuration web page
Unmount SD card from Ubuntu virtual machine and boot
Boot PAW and enjoy

If you needed your backup in an emergency:
*Restore backup to SD card
Mount SD card in Ubuntu virtual machine
Discover SD card drive mapping
gunzip -c /home/*user*/Desktop/PAW_Backup/PAW_SD_Card_Backup.img.gz | pv | sudo dd of=/dev/sdb*
This take a very long time but is due to SD card mapped in virtual machine - as with any backup, really only useful in an emergency where time isn't critical but the data/outcome is!

Thanks
Rob
« Last Edit: July 08, 2019, 11:24:10 pm by RobertPBham »