I've been using a Dell Wyse 5060 thin client as a Docker box using DietPi. It came with an Apacer 64 GB SSD. With more Docker containers being added and more media (ebooks, audiobooks, documents, etc.) being uploaded, I needed to upgrade the storage.
I watched a couple of YouTube videos about it and it looks simple enough. Open up the case, remove SSD, replace with new SSD, and voila!
Prior to the hardware upgarde, I did take a backup using dietpi-backup utility. It saves the specified folders in /mnt/dietpi-backup/data, and a dietpi-backup.log is generated and a hidden .dietpi-backup_stats file records the start and end time. To make a copy of the backup for offline storage, I did a tar cvfz backup.tgz /mnt/dietpi-backup/*
Couple of things to note:
- The SSD used is mSATA. That said, not all mSATA modules are the same size. I extracted my replacement from an ADATA SU650 SSD, and the module is wider and longer. No screw in the middle, too.
- Because of the bigger size, a part of the aluminum shield for the memory modules had to be removed/reduced for the SSD module to fit.
- When you run tar with a wildcard, hidden dotfiles are not captured and archived. And because the hidden .dietpi-backup_stats file was not archived by tar, dietpi-backup refused to restore my backup. I had to reconnect the original SSD, mount the USB stick, copy the missing hidden file to the USB stick, connect the new SSD, mount the USB stick, then copy over the missing hidden file.
- OR I could've just manually create and edit a new .dietpi-backup_stats file:
- YYYY-MM-DD_hh:mm:ss Backup starting
- YYYY-MM-DD_hh:mm:ss Backup completed
The better way of performing the backup/restore is:
- cd /mnt/dietpi-backup; tar cvfz /root/backup.tgz . (this will archive even hidden files in /mnt/dietpi-backup)
- cd /mnt/dietpi-backup; tar xvfz backup.tgz or tar xvfz /root/backup.tgz (depending where tgz is located)
I also did notice that the installer didn't seem to make use of my settings for /boot/dietpi.txt. It still asked for locale, keyboard settings, layout, etc.
On first boot, make sure network connection is there. DietPi wants to do apt update as part of first boot and will complain if it can't. Restore process also requires apt update, so provide network ASAP.
Also, prior to the backup process, make sure the OS, apps and packages are up-to-date. Purge old files, logs, backups, and Docker images. This drastically reduces backup and restore times.