pinn icon indicating copy to clipboard operation
pinn copied to clipboard

Backup feature not working

Open TheUnknownHack3r opened this issue 2 years ago • 10 comments

Hi. I can't get the backup feature to work. I am using a Raspberry Pi 4. I have a 64GB USB stick with 2 partitions (one labeled 32GB NTFS, one 32GB FAT32, labeled "BACKUP". It contains a os folder and nothing else). Why won't it work?

TheUnknownHack3r avatar Sep 17 '23 01:09 TheUnknownHack3r

There are several constraints to using the backup feature. Do you mean the backup button is greyed out so can't be pressed? Perhaps it is because your 64GB USB backup drive has 2 partitions on it, as PINN only looks at the first partition. If your 32GB FAT32 BACKUP partition is partition 2, then it probably won't be detected. Try swapping the partitions over.

procount avatar Sep 18 '23 07:09 procount

Unfortunatly, after trying this it still didn't reconize it.

TheUnknownHack3r avatar Sep 19 '23 01:09 TheUnknownHack3r

Which OSes are you trying to backup? Can you post some logs? You can look at the troubleshooting section on the wiki for instructions on how to do that.

procount avatar Sep 19 '23 09:09 procount

I'm trying to back up "Raspberry Pi OS Lite (64-bit)". However, I have made a major modification that I think I should mentioned. I upgraded the base system (Debian 11 Bullseye) to Debian 12 Bookworm. Should I try a spare 16GB USB that I have lying around (I am using a 32GB micro-sd card for my Pi) P.S. I will try to post some logs tomorrow

TheUnknownHack3r avatar Sep 20 '23 02:09 TheUnknownHack3r

So I tried using a diffrent USB with 16GB and only one partition, the drive was detected! However, will a 16GB USB be able to hold a few months of backups (done monthly) for the Pi with a 32GB micro SD card?

TheUnknownHack3r avatar Sep 22 '23 22:09 TheUnknownHack3r

Use df -h and add together the used space of the partitions belonging to the OS you are backing up. As a rule of thumb, if you divide this by 3 it will give you an idea of how much space a backup will take up. It is only rough though.

procount avatar Sep 22 '23 22:09 procount

Thanks for the quick reply! Could you explain exactly how the backups work? I'm curious if it's incremental or not.

TheUnknownHack3r avatar Sep 22 '23 22:09 TheUnknownHack3r

PINN creates a backup in the same format as a set of installation files for an OS. In this way, the backup can be restored by installing or replacing that backup like a standard PINN os installation. So essentially it is a set of tar files (one per partition) that are compressed, and a set of meta-files to tell PINN how to install them. In this way, no unused space is backed up and the backup can be restored to a different sized partition (provided it is big enough). Please test all your backups.

procount avatar Sep 22 '23 23:09 procount

When I try to backup, it fails. I would share the logs, but I don't have a way of extracting them, since the logs are under /tmp. And the default browser doesn't load GitHub properly.

When I follow the log with "tail -f", I see that it fails at the point partway through making root.tar.gz (the usb I am using as of right now has 64GB and is formatted with ext4):

pigz: abort: write error on (Read-only file system) "Error writing raspios_arm64_lite: Disk full?" mount: special device /dev/sda1 does not exist

TheUnknownHack3r avatar Sep 23 '23 16:09 TheUnknownHack3r

I have seen this problem and I'm looking into it. For some reason the USB drive disconnects mid-backup, causing the backup to fail.

procount avatar Sep 23 '23 17:09 procount