Looking for backup tools, I found these…

1/ a freeware for Windows which can create images of your USB flash drive
USB Image Tool
EDIT: backup file too large (!?)
Not recommended.
Gotta find another one…

2/ an opensource deduplicating backup program.

The main goal of Borg is to provide an efficient and secure way to backup data. The data deduplication technique used makes Borg suitable for daily backups since only changes are stored. The authenticated encryption technique makes it suitable for backups to not fully trusted targets.
Not tested.
I’ld like to read your thoughts (noob to Linux and OSMC).

You can change to compressed images in settings which greatly reduces the size

Just sayin

@ CaNsA
that was my first idea.
But on my W10 machine Win32 Disk Imager does not see my USB stick.

I don’t have this option.
And more, it is a 32 Gb stcik on which there’s only OSMC installed and it makes a 32 Gb image file!

Of course it is, by definition an image is a 1:1 copy.

My mistake, it’s not a setting in settings, you choose to save as a .imz or other compressed format

dd then tar.gz or if you just want to store your settings i can recommend syncthing

USB Image Tool as been my default choice for a couple of years, even though win32imager is the most popular one. USBIT has a more simple and to the point interface while it is by default set to device mode and easily supports writing larger images to an SD since not one SD card has the same size as another.

I’m using BTRFS on all my linux systems. I noticed that in November, OSMC started supporting initramfs (providing a kernel with support enabled), so I’m not able to use BTRFS on my OSMC devices. Updated a raspberry pi A today from June 2015 release to most current, and then converted to BTRFS. Boots fine.

BTRFS lets you take snapshots, and then you can send|receive them to backup devices (external hard drives for instance). Benefits of BTRFS include deduplication and compression. You can also have an endless number of backups (snapshots) with minimal storage costs. Makes backing out of updates easy too (don’t like what happened after an update, simply boot using a snapshot).

Happy to finally make use of BTRFS on my media center devices :slight_smile:

Did you have to use a custom initramfs or did ours work OK with rootfstype=btrfs? I imagine there would be a bit of work to do to get it to work with btrfs.

Surprisingly, very little work needed.

The June 2015 release was a no-go because I couldn’t get initramfs booted (and I didn’t want to start tearing apart the boot files or compiling the kernel myself).

Updated to the latest version. Only the standard set of changes needed to get BTRFS running (along the same line that I needed to perform on a raspbian install).

In a nutshell:

  1. apt-get install btrfs-tools
  2. add btrfs to /etc/initramfs-tools/modules
  3. update-initramfs -c -k uname -r
  4. for the initramfs image generated (4.4xyz etc), add following to /boot/config.txt
    initramfs initrd.img-…4.4xyz… followkernel
  5. modify /boot/cmdline.txt
  6. create a btrfs partition (/dev/…btrfs_partition…) and rsync a copy of root to subvolume …subvolume_name…
  7. update /etc/fstab in subvolume …subvolume_name to reflect correct mounting for btrfs (type, subvol, etc)
  8. relocate swap to a ext4 partition (modify the perform_tuner script in /usr/sbin/ to replace /swap with path to swap file)

    reboot and be greeted with the “Scanning for BTRFS filesystems…” :slight_smile:

Absolutely painless to migrate.

I see

Using the Debian initramfs isn’t officially supported. Ideally it would be good to get support for this in our own initramfs. You might want to have a look at our Git repository if you’d like to get it officially supported


I was viewing the GIT repository to figure out initramfs would work (I saw a change comment for November saying support for loading initramfs before kernel loads, precisely what I’m looking for to ensure BTRFS is loaded before root is loaded). I wasn’t sure exactly what OSMC was using it for or rather under what situation does it load. It’s also how I tracked down how the swap is being used so that I could get around to mounting it on a separate partition. So much easier finding stuff in GIT then hunting for it in a filesystem :slight_smile:

We roll our own initramfs, rather than the Debian one which is quite bloated. See osmc/package/kernel-osmc/initramfs-src at master · osmc/osmc · GitHub.

The main init script is: osmc/init at master · osmc/osmc · GitHub

Building is very easy. It can be done on any OSMC device

sudo apt-get update
sudo apt-get install armv7-toolchain-osmc build-essential git (for pi2/pi3)
git clone https://github.com/osmc/osmc
mount --bind $(pwd)/osmc /opt/osmc/armv7-toolchain-osmc/mnt
chroot /opt/osmc/armv7-toolchain-osmc
cd mnt/package/kernel-osmc/initramfs-src
make cpio DEVICE=rbp2

This will generate an initramfs.gz


New and promising…
“Start burning your images the easy way” with Etcher

Why Etcher?

Here at resin.io we have thousands of users working through our getting started process and until recently we were embarassed about the steps that involved burning an SD card. There was a separate track for each Mac/Windows/Ubuntu and several manual and error prone steps along the way.

To our surprise there was nothing out there that fitted our needs. So we built Etcher, a SD card burner app that is simple for end users, extensible for developers, and works on any platform.

Give it a try.

hi ddurdle,
I have been using your recipe for years and it worked a charm, thanks. With the recent upgrade to buster, though, this broke. I refer to this thread. Just wandering if you had the same issue and found a solution, or if you manged to progress btrfs implementation in the osmc initramfs.

I may have achieved this in a very simple way.

BTW I couldn’t get this to work, it kept complaining about missing packages in the system, and APT sources failed. Resorted to do the full kernel compile which doesn’t require a chroot environment, a bit of an overkill for a couple of changes in one file only…