Alternatives to tar for archiving Linux system?

Whenever I wipe my PC, I use tar to make an archive of the whole system. This works, but having to decompress the whole archive to pull files out is very annoying. Is there another archive format that:

  • Preserves permissions (i.e., is Unix-y)
  • Supports strong compression (I use either zstd or xz depending on how long I can be bothered to wait)
  • Supports pulling out individual files quickly
cow,
@cow@lemmy.world avatar

I use bupstash.io

hyperspace,
hyperspace avatar

Maybe DwarFS is what you're looking for

Fryboyter,

Maybe Borg is a possibility. However, I have not yet backed up an entire system with it, but only certain files.

  • The file permissions have always been correct when restoring files in my case.
  • Which compression (LZ4, zlib, LZMA or zstd) and which compression level is used can be specified when creating a backup.
  • Backups can be mounted via FUSE, so that you can restore individual files with an file manager or a terminal emulator, for example.
brechmos,
@brechmos@lemmy.ca avatar

At least on the Mac (bsdtar) you can extract single files out of a tar file.

E.g.,

Create the tar file:

tar cvzf pseudo.tgz pseudo/

Move to another directory

cd /tmp/tt

Extract a single file:

tar -xf …/pseudo.tgz pseudo/10481_2017.1069.png

You say PC, so might want to check the tar version you are using and see if there are extra parameters to do the file extraction.

JollyRoberts,

@brechmos came to mention this. There is also an argument to list the files in the archive if you don't remember the name/path of the one you want.

I don't remember the arg but it's either -t or -l I think

@jmshrv

Xandris,

the main modes are:

  • -c for create
  • -x for extract
  • -t for test/list

tarballs are one long compressed stream, and extracting a file requires decompressing all those before it in the archive, so another archive format may be a better choice if random access to files is important

  • All
  • Subscribed
  • Moderated
  • Favorites
  • datahoarder@lemmy.ml
  • PowerRangers
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • khanakhh
  • Youngstown
  • everett
  • slotface
  • tacticalgear
  • rosin
  • thenastyranch
  • kavyap
  • tsrsr
  • ethstaker
  • Leos
  • vwfavf
  • GTA5RPClips
  • Durango
  • osvaldo12
  • cisconetworking
  • hgfsjryuu7
  • InstantRegret
  • cubers
  • modclub
  • normalnudes
  • ngwrru68w68
  • tester
  • anitta
  • All magazines