Trouble with the Backups app

It seems that my backups are broken on my Librem5.
I did a few successful initial ones with the default PureOS app, but after I started porting my data over to the phone I began to get failed backups, and for the past few weeks I have been unable to get one completed, whether scheduled or on-demand. What I get is a GPG error:

Error processing remote manifest (duplicity-inc.20230704T013147Z.to.20230704T052219Z.manifest.gpg
): GPG Failed, see log below:
====Begin GnuPG log====
gpg: decrypt_message failed: Unknown system error
====End GnuPG log====

Context: I am using the Librem5 basically always tethered: Hoyoki hub, ethernet cable, wired mouse & keyboard, HDMI screen. I am running the latest version of PureOS (latest update: today). I am keeping all my data on a 256GB microSD card in the phone, and I thought I would do backups to a different microSD card, so I got a 512GB one that I plugged into the slot on the hub. Under the Preferences > Folders option in the app, together with the default ‘Home’, I added the 256GB volume, which shows up as ‘/media/purism/3239-3663/’. I opted for encrypted backups, and I clicked on the ‘remember password’ box. The first time the Backup failed, I got an error message along the lines of:

Giving up after 5 attempts. Error: Error opening file
/media/purism/3038-6438/76osmiumBackup/duplicity_full.20230705T173739Z.vol1.difftar.gz : input/output error

I believe this was due to the fact that at that time the Librem5 was not connecting to the 512GB volume in the Hoyoki dock for some reason. Since then, every time I check, the backup SD card shows up normally in Files (I can access it fine), but the Backups still fail, and now I get the first error message (the GPG one). I have tried to only back up the Home directory on the phone, instead of the 256GB card, but I still get the same error message.

So, questions:

  1. Does it even make sense to use the default Backups app to run backups between these two SD cards? Would it make more sense to use a different program?
  2. Should I be concerned that my internal SD card is mounted in /media instead of /mnt? Could this be the culprit, and if so how would I fix it?
  3. Could the GPG error I get now be a consequence of the previous error? If so, might it be fixed by reinitializing the backups, and would that be as simple as deleting the current backup file on the 512GB volume?

Is this happening to anyone else?
Thanks in advance for any advice.
I apologize for asking newbie questions.

It is hard to isolate the issue with such a complicated and convoluted setup. Can you explicitly clarify where the backups are? It is not clear if they are on the eMMC, the 256 GB microSD, and/or the 512 GB microSD.

Hi,
Yes, the backup files are exclusively on the 512 GB microSD, which is physically housed in the Hoyoki hub. The bulk of the data I am trying to back up is on the 256 GB microSD, which physically is in the phone’s SIM tray. I am also trying to back up the eMMC, but there’s hardly any data on it.

I can only really offer general advice because I am not using the app that you are using for backups.

That depends on what data is on the internal SD card and what your backup plan looks like.

As an example for me: The only content on the internal SD card is music that is a copy of what’s on my server - and hence there is no need to back up the internal SD card at all.

Given that you can usually quiesce the SD card (ensure that no program is actively using it), there are many approaches to backing it up if you need to. (The distinction being made here is as against the eMMC drive, where quiescing it is not possible while the phone is booted.)

In the general case, no, that wouldn’t concern me. To be honest though I would not mount the internal SD card at /mnt. I would create an explicit separate mount point and mount it there.

You put an entry in /etc/fstab

Let me know if you need more clues for the format of the entry.

I don’t know about that (because I don’t use that backup app) but I think you ought to relabel both your SD cards. Random (32 bit?) labels are not exactly user-friendly. However that may cause problems with your existing backups (which don’t exactly work anyway, if I understand correctly). And that leads on to my next question …

Also, what file system do you have on each SD card? Are these ext4? (recommended) or some Microsoft FATty thing? If you took the default as it arrived from the vendor then it may well be the latter. Unless you have a pressing reason (e.g. interoperability with a Windows computer) then you want the former.

Of course, if you have to change the file system on a card then that will wipe everything out on the card - so you would want, er, a backup first.

Well, I was thinking of keeping all my data there, so yes, large quantities of music, photos, videos, pdfs and epubs, but also LibreOffice files and code that I would be modifying a lot (in total, about 110 GB). There is no real reason why I thought it would be better to have them all there instead of on the eMMC, except that it’s eight times as big. In fact, I was wondering whether there might be considerations in favor of keeping some of this data in the phone’s native storage, instead (performance? encryption?). Indeed, at one point I was wondering whether apps themselves could be installed on the SD card, and if that would be at all reasonable/desirable.
As for my backup strategy, I am trying to avoid backing up to a cloud. I am attempting to migrate from an old (~2012) Mac laptop, and use my L5 as my main device (at least for non-work computing). I was planning to do my routine backups (on the model of Apple’s Time Machine) on the 512 GB SD card in the hub (since I am basically always using the L5 tethered), and then do more infrequent ‘last recourse’ backups to a USB key that I plug in to the hub once in a while. I wanted both backups to be identical versions of all my data.

Ah ok, excellent, I clearly need to do that. I see that you can fiddle with the mount options of volumes in the default Disks utility, but I haven’t tried to play around with it yet (b/c no backup!).

Yes, that would be super helpful.

Again, agreed, and could definitely use some pointers!

Yes, you guessed right, I plugged 'em in straight from the package, and they’re indeed an exFAT (v1.0) file system for both SD cards (same vendor). And no, no reason to stick with exFAT. I guess I can change that by reformatting the disk with the default Disks utility? (I don’t know the command line version of this!)

Yeah, right now the backup I do have on my 512 GB SD card is so old/incomplete that I do not mind losing it. So theoretically, I could fix the label/mount point/file system issues of the 512 GB card, perform a backup on it of the other card (or simply cut-paste the entire contents of the 256 GB card onto it), then fix the same three issues on the smaller card and retransfer all its data onto it? No style points, but perhaps workable?

Many thanks for all your suggestions. I definitely need to find a good, comprehensive migrating-from-Apple-to-Linux resource so I don’t have to bother people with very basic questions.

Performance … yes.

Encryption … not really because you can choose to encrypt the SD card - the same as you can choose to encrypt the eMMC drive - but that may be too much complication just now.

Generally that is difficult. I suggest ignoring that for now.

Firstly create the mount point directory e.g. with

sudo mkdir /myusd
(will prompt for the purism user password, which is your screen unlock password)

then add an entry to /etc/fstab that looks like

/dev/sda1 /myusd ext4 rw,noatime,nofail 0 2

where you replace the two occurrences of myusd with whatever name you would like for the mount point.

However before doing anything with the above two activities you will need to complete
a) reformatting the external SD card to ext4 and giving it a sane label, and
b) getting any kind of backup of the current contents of the internal SD card, and
c) reformatting the internal SD card to ext4 and giving it a sane label like MYUSD

Looks like it. I personally tend to use gparted but that probably doesn’t work so well on the Librem 5 (screen size not adapted?). That’s not a problem for an SD card since you can format it on a desktop/laptop and then move it to the Librem 5, if you have to.

That approach is not ideal in the specific case of the internal SD card because the SIM tray is a bit finicky on the Librem 5 (and also customers have fried their cards by removing the SIM tray while the phone is powered on). So if Disks works for you on the Librem 5 then go for it.

For the external SD card (the one in the dock) formatting it on another computer is an easy option - assuming that you have a Linux desktop/laptop.

Actually I didn’t make any comment about the mount point of the backup (external) SD card. (But, yes, I would fix the file system and give it a clear and obvious label.)

If you did want to create a fixed mount point for the external SD card then that requires a little more sophistication (since the external SD card is more “dynamic”). Let’s get through all the rest of the process before tackling this.

I would avoid using the existing backup software for this process - since it isn’t working for you and we don’t exactly know why. Yeah, copy-and-paste within a file manager won’t win you any style points :wink: but could do the job. If using that approach, I would at least do some sanity checks and spot checks to make sure that you have some confidence that everything copied correctly.

Not something I can help you with. Only Linux here. No Mac. No Windows. Well except for iPhone that I hope to phase out eventually.

There are a few other topics from people using Mac, so maybe forum search.

1 Like

Well, it took a minute, but I think this all worked! I now have an SD card with an ext4 filesystem labeled Ion (for internal), mounted at /Ion, and a second SD card, also ext4, labeled Eco (for external), that mounts at /media/purism/Eco when I plug the L5 into the dock.
The default Backups app does its job in backing up the files present on /Ion as well as the Home directory of the phone’s own drive to the Eco SD card. First backup took ~9hrs. (for ~100GB), but the updates since are of course much quicker. I have tested restarting the phone and unplugging it from/replugging it to the dock, and the viability of the backups mechanism seems unaffected.
So, success!

3 Likes