System restore/backup on Kinoite

This is specific to Kinoite.

I have been looking at ways of securing a new Linux installation and Kinoite has the advantage of a) being an immutable OS and b) keeping a minimum of the last two versions.

I work with Raspberry Pi’s and after installing docker to the OS, every application is installed to a container using docker compose.yaml files. So the notion of containerised packages isn’t new and is something I’m comfortable with.

User data (/ and /home/some_user_or_other/) is backed up by 3rd party proprietary software to a Synology NAS. So this post is about system backups only and not user data.

With Kinoite there’s no need to back up the OS either: its there, RO and with a spare (the previous version).

Apps are easy to reinstall but the config settings for some are quite complex and are often honed over time.

“System Restore” type solutions won’t work with Kinoite and nor will utilities such as Snapper or Timeshift because the OS is read-only. I guess, utilities like Clonezilla/Rescuezilla will work because the are essentially disk cloning/imaging systems - but I’ve never tried either, so not really sure.

Besides, backing up and restoring an entire disk, necessitating booting into a Clonezilla drive and taking the backup requires a level of dedication I’m not sure I can maintain over time… And an entire disk backup for what essentially are config files seems overkill.

User-data is backed up using Synology Drive Client (Flathub has Synology Cloud Station Backup) so I’m wondering if that already-working solution could be extended to those application config files as well. I’m not sure where the config files might be stored and I don’t know if they can be restored from the NAS with the correct timestamps/ownership/permissions, but maybe someone does?

If the Synology route is a non-starter then what does the Kinoite community use for securing their systems? Or advocate? I’m interested in the strategy as much as utilities that can be used.

Regards,
Ric

1 Like

Hey there! I just recently backed up my entire system. I also use Kinoite for a long time.

I use rsync for this, a very complex command that I have put into a bash script. I will opensource it soon and you can have a look. You basically sync home to the backup ssd, but add a TOON of excludes so that you dont sync all the cache and bloat.

One issue here: flatpak apps all have their individual cache and I am not sure if rsync understands wildcards (*).

I dont use a proprietary synology device, but simply a 1TB laptop HDD. Horrible for running an OS on, awesome for backups.

HDDs store data very long when not connected to lower. SSDs may lose their data when not charged for a while.

HDDs are more affected by wear through use, so perfect for backups.

Or use tape drives XD they are insanely big too.

If you want to be wireless soo urgently, mount your synology storage to the system? Somehow? And then rsync to that.

I have a HDD with the BTRFS filesystem on it, in theory that could allow me to do some fancy things in the future like heal itself.

But then you might want to do this daily? You could totally run the rsync script with a systemd service. Create a systemd target if the NAS is connected and have the service require that target to be active.

1 Like

I personally use my own NextCloud* to backup any file data I care about via the Nextcloud client so stuff is automatically sync’d. I also use BTRFS assistant, which is not the same as a backup, but between ostree, btrfs snapshots, and Nextcloud, I’m confident I can quickly recover/rebuild my Kinoite.

*Nextcloud itself is backed up on a local drive and a BackBlaze B2 instance. I’ve heard of some running Nextcloud with Synology, but I’m running it on Fedora as a regular old LAMP stack. If Synology can do NextCloud, then you have a very straightforward path with the Nextcloud Client.

1 Like

look in ~/.var/app/

So i guess since you’re already backing up the home directory, just make sure these config folders are included.

As a side note, you may be interested in Warehouse. It can open a flatpak’s data folder for you in case you cant be bothered to go to .var/app/name.of.app/ yourself, lets you take snapshots of the data, can quickly show and delete data for uninstalled apps, and so on.

1 Like

Very useful, thanks. Yes, all the config files appear to be there and intact. Would already have been backed up with the user data in /var/home only I would never have realised it was there.

I’ve checked that out and it looks promising. Shall try later today.

But I’m having a massive issue with Synology Client. It’s not available as a flatpak nor as a layered package so I tried installing it through toolbx. The link is here: [GitHub - EmixamPP/synology-drive: Unofficial RPM package of Synology Drive Client](https://Github Synology Client)

Far too many errors during the install and a whopping 400Mb download (probably because of dependencies - and then some).

It almost works but files are missing and the backup pauses on the last few files, then goes no further. I used the same link to install in Fedora KDE Plasma Spin (which I’ve also been trialling) and it worked fine…

Without a successful backup to the Synology NAS the Kinoite route might not be for me. I shall try other clients. I also have Beyond Compare 5 which also worked well in KDE Plasma Spin, to I might give that a go, but that too might oly be possible through Toolbox.

Useful post, yes I’d like to have a look at some point. No urgency though.
Ric

Can you use borgbackup?
it’s packaged in :fedora: and there is a gui application (vorta) also available.

There’s an older article about using it on Silveberblue.

1 Like

I’ve read about Vorta/Borgbackup before but dismissed them as I thought user data backups were solved with Synology Drive Client and I was looking for system-level backup. However, with Jasper’s suggestion of Warehouse (which I still need to try-out) a backup of /home might be sufficient. Of course, it would require a manual reinstall of the OS + all the apps in the event of catastrophic failure but that’s not a huge task; the loss of thousands of processed images, etc, would be a huge setback (but the originals are secure and off-site).

I suppose my aim (driven by a move away from Windows, Google, Amazon, uzw) is to have an easily maintainable system where I can just get on with things and not have to dive down into the system-level complexities of file systems and so on. (Not that that bothers me - I regularly write stuff in C++ for ESP32 IOT devices but “media” is another hobby and doing the creative stuff is equally important.)

I think the way forward is with immutable OS and atomic-level applications, containers, and so on and I do like the direction of Kinoite. So, thanks for the heads-up; I shall try it and report back.
R

Yeah in my rsync script I also only backup home

I simply have a huge list of excludes to make the backup smaller. Like include .torrent files but not the content, exclude cache etc.

And yes all flatpak data should be in ~/.var/app

You can use Filelight (KDE) or the GNOME equivalnent to look at how many files you have where

Well, this has been quite the journey… This is a long post and is intended to offer hope to those who want to try things out. Ignore now if it’s not for you. Or jump to xxxx.

First, I’ve had the luxury of a recent install of various OS distros and there is no consequence of losing everything. I’ve taken snapshots, screenshots, made notes along the way and my notes have been the real value. I’ve done about 12-15 test OS installations.

I have, perhaps, learnt most through mistakes. But I’ve always been an advocate of heuristic learning and this has been a good experience overall. It has been expensive in terms of my time, has consumed much effort of thinking and has been frustrating beyond belief. But I wanted a resilient system, one that is going to replace Windows and I needed to be sure that I wasn’t going to screw myself later on by just installing “some stuff and hoping nothing bad would ever happen”. Well reality always intervenes: eventually something bad always happens and the best is to mitigate against it.

I had my first exposure to Linux in the 1990’s. I built a server using FreeBSD, installed a DNS server and used the box for network services, and so on. Great fun; limited lifetime: it takes a lot of effort to stay up-to-date. So: back to Windows… Lazy option, yes.

My PC will not upgrade to Win 11 (inherited gen 7 mobo+cpu from a friend on the cusp of gen 8 CPUs); I’m tired of Google, Amazon, Microsoft and the rest and just want a system that isn’t exposed to any of the corporates who just want to scrape data and re-sell it. So: Linux it is.

Have tried 3 or 4 distros. Easiest & most comfortable was Fedora + KDE Plasma. Then I discovered Kinoite - and a whole new world of immutable OS. I have been more than happy to spend time learning, experimenting, making noob-level mistakes and generally floundering.

The MOST important things to me (learnt from bitter experience over many years - and I was there when the first MPU’s were released including the SC/MP - which even had to multiplex the address space due to lack of pins on the DIL chip - and which I programmed in machine code) was first, secure data, second secure the system, third, sleep at night.

I am full of admiration and debt to the Linux community and equally indebted to those who respond to community posts and offer solutions. A huge thank you. And some.

I’ve found I have been struggling with one hand tied behind my back: “Discover” in Kinoite never worked properly without creating errors. The struggle has been to find a suitable backup client on top of an immutable OS.

With “Discover” shackled by errors I resorted to rpm-ostree and also toolbx. I was really out-of-my-depth with the latter and wrecked many an installation. With Kinoite I missed the ease of backing up user-data with Synology Client. Realising (from a post from Jasper) that all the configs from Flatpak were in one place, it seemed all I needed to do was back up user data and use that to recover everything both at system-level and user-level.

I have struggled with every backup solution (Timeshift, BTRFS-assistant+Snapper, BorgBackup (using Vorta), Pica, SyncBackup, FreeFileSync, DejaDup). Then today, a minor update to 20241125 and “Discover” started playing ball. Synology Drive became available via flatpak and, after installing it, aggressively deleting some apps, test files and directories, I can recover almost everything.

xxxx

The future: I think Kinoite (and its eventual developments, including the related Gnome “Silverblue” variant) IS the way forward. I invested many £££ some years ago in an 8TB Synology NAS and am absolutely happy that I can continue to benefit from that. I can sleep at night knowing that essential user-data (~/username/whatever) is secure and that I can recover most things in the event of catastrophic failure. I had high hopes of Timeshift but it absolutely screwed a standard install of Fedora+KDE Plasma. I think I was incompetent handlingTimeshift but the documentation is lacking.

The future (for me - but possibly - regretfully? - not for you) is Kinoite + Synology Drive. I’d like some means of taking snapshots (like Timeshift - which does not sit comfortably with an immutable OS). If there is any disappointment it is that, after some 25+ years of my first exposure to Linux, there is still no simple, reliable way of securing an installation at system- and user-levels that is inbuilt into the OS.

This IS a priority that sits above all new features. I can only encourage it and will be more than willing to test it. Because it matters. Really matters.
Ric