I would like to make manual backups of an SD card as a disk image so that it can be easily recreated when needed. I’d like to keep a few versions in case there is a problem I didn’t know about, it can be rolled back.

How can I do this incrementally, or with de-duplication, so that I don’t have to keep full copies of the complete SD card? It’s very big but most of the content won’t be changing much.

It’s for MiyooCFW ROM which is on FAT 32-formatted micro SD card.

Thanks for your help! Also let me know if I am going about the problem in a wrong way.

1 point

note to myself and anyone with same problem who finds the thread:

stumbled on psync: A naive tool for syncing partitions using rsync which sounds like it’s at lest trying to do this task.

No documentation, no users, no project changes in 6 years… Will give it a try another time.

permalink
report
reply
2 points

I recommend just backing up the files.

But if you really have to back up the disk image, dd a copy of it, mount the copied image as loopback device, write the loopback filesystem full of /dev/zero, sync, delete the zero file(s), unmount, cp --sparse=always and store the result.

The reason for using the loopback image step is to prevent wearing out the SD card with writing the free space full of zeros every time you make a backup.

There may be an existing tool for this, but I don’t remember it.

permalink
report
reply
2 points

You’re looking for a block level incremental backup solution. This can either be achieved using filesystem based snapshots (ZFS, BRRFS) or using dedicated programs. I know rdiff-backup , restic and duplicity use block-level diffs, not sure about rsnapshot.

permalink
report
reply
1 point

I haven’t tried such a thing, but I remember ZFS has an option for block deduplication.

So you would set up a ZFS with block deduplication (and probably without compression - try this point out), and then you make your backup images with the dd tool and the correct block size.

Now you make always full copies and have them as normal files but they take only the disk space of the differences.

let me know if I am going about the problem in a wrong way.

I would not say “wrong way”. I’s fun to think about such things and try them out.

On the other hand I think a FAT32 can have only 32Gb. I would not mind having many of them lying around on my home NAS that has 12 Tb on RAID :-)

permalink
report
reply
1 point

hmmm I think this is a bit beyond me; at this point I don’t want to create an additional side project. I might learn about the more modern spiffy file systems in a few years.

permalink
report
parent
reply
2 points

in a few years.

Never give up :-)

permalink
report
parent
reply
2 points
*
Deleted by creator
permalink
report
reply
2 points

the clonezilla website clonezilla.org says

Differential/incremental backup is not implemented yet.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8K

    Monthly active users

  • 3.7K

    Posts

  • 48K

    Comments