Restore specific folders from a Sailfish Backup?

Is it possible to restore specific folders from a Sailfish Backup?
In my case I somehow lost many audio recordings which were saved in the documents folder. I don’t want to restore the full backup since it was a while ago. Is it possible to extract the folders?

1 Like

In the Quick Start Guide, there is a USER BACKUP section in which by two shell scripts and the use of the SSH connection available in developer mode, it is possible to create a backup of the entire user home for every users and restore it. Changing a little bit the scripts, they will work for a specific folder or a group of folders.

Hmm, I don’t think the contents of ~/Documents is included in the backup (try tar -tvf <backup file> | grep Documents). That’s why I wrote this My Backup thing - to add arbitrary files or directories to the backup tarball.

2 Likes

Obviously you have absolutely no understanding how mybackup works. Also the source is linked in openrepos and you could compile it for whatever you want. I find your comments about other peoples valuable work disrespectful.

4 Likes

Not to mention that it most definitely has aarch64 packages available for the later releases.

4 Likes


picard-face-palm

4 Likes

Are you aware what .spec file is for? And that %install macro is applicable for rpm building environment only and has nothing with rpm installing?

3 Likes

You write a lot of text but I generally don’t get your point even if I spend a lot of time reading your posts.
I might be wrong but what I perceive is that it would be more profitable to the community to let the work which is already done where it is, and contribute by bringing more new things.
I mean, why not contributing to @slava’s backup work or @olf’s guide by suggesting simple and clear enhancements instead of reinventing the whole wheel and disturbing where the attention should lead?
That, would be constructive IMHO.
It is a community after all, and collaboration is one of the strength of these kind of structures.
You also would profit of contributing/exchanging, even if you think to know better than others.

6 Likes

Sorry @spark, just realized I was totally off topic. Stopping here, promised :innocent:

Ok, I see.
I try to help were I can, sometimes give some money/beers/coffees, try to test some bugs reports, try to debug some HW tthings, but I do not contribute very much compared to the ones who write apps, guides, sort bugs and so on.

3 Likes

Unrelated to the discussion but a bit more on-topic: It’s quite unfortunate to not include the Documents into the official SF backup. Or maybe to put it differently. Why are the recordings of the Jolla recorder app not saved as “media” in a folder which is contained in the backup, just like images and videos?

3 Likes

Seems that the stock backup is far from perfect.
Issues are regularly reported.
I prefer to use a command line tool like rsync. (Some users recommend rclone)

Probably you know it, but if it this can help, although drafty-tinkerish, here is what I’m using since years on linux systems to backup/restore:

-Have a big enough microsd formated in ext4
-in the terminal:

rsync -vaHE --force --delete --recursive --exclude=some_dir_you_want_to_exclude /source_directory/ /dest_directory/

MicroSD is mounted in /run/media/defaultuser/[some_numbers]

Use at your own risk as this can delete your data if you e.g. invert source and destination.

I was too lazy to perfectly choose the rsync options. As soon as it was working, I kept it as is. But you should look further with man rsync.

I shouldn’t but I always do this as root. If it complains about missing permissions on some files, do it as root too. (=enable dev mode in settings, login as root with devel-su)

I did put these commands in a script that is run every hour, so backup is automatic.

1 Like

This is a somewhat flawed initial attempt at Feature Request: https://forum.sailfishos.org/t/make-audio-recordings-target-directory-configurable Help me improve it :slight_smile:

The rsync is the best choice for additive backups of home users contents while tar + gunzip is the most suitable option for restoring the smartphone immediately after a re-flashing operation especially when an internet connection is not available, yet or it is not available one well-configured enough to be enough secure to keep the smartphone always in a safe/private status.

It is included, obviously:

~/Documents/backup$ tar tvJf defaultuser.tar.xz | grep -i documents
[...]
drwxrwxr-x defaultuser/defaultuser 0 2023-06-28 10:23 defaultuser/Documents/
[...]

Possibly the Downloads folder can be optional by user choice.

I double-checked Sailfish OS 4.0.1 and 4.5.0, there’s no ~/Documents in the backups created by Settings → System → Backup page. It could be that it was there before the backup system was redesigned and simplified.

1 Like

I can confirm that my last 4.4.0.72 backups did not contain ~/Documents. It was a pita.