mkstage4 icon indicating copy to clipboard operation
mkstage4 copied to clipboard

Progress bar

Open GrabbenD opened this issue 2 years ago • 4 comments

This tool is a lifesaver but with larger system installations it can take quite a while to finish and a progress bar would be very useful. For instance, when using the dd tool this can be accomplished with fsync:

dd if=/dev/nvme0n1p3 bs=4M status=progress conv=fsync | bzip2 > /mnt/nvme1n1/backup.bz2

Are there actually any existing methods to view the progress of mkstage4?

GrabbenD avatar Sep 16 '22 14:09 GrabbenD

I agree that this could be useful, though I'm not entirely sure how to do this in a way that supports the various compression algorithms. If you have a suggestion I'd be happy to review it.

TheChymera avatar Apr 16 '23 00:04 TheChymera

Good point @TheChymera

I've switched to NixOS since Gentoo was consuming too much of my free time. Nix ecosystem also offers incredibly fast rollbacks and OS configuration switching

GrabbenD avatar Apr 16 '23 08:04 GrabbenD

@TheChymera it would probably suffice to add to

TAR_OPTIONS=(
	-cpP
	--ignore-failed-read
	"--xattrs-include=*.*"
	--numeric-owner
        --checkpoint=.500
	"--use-compress-prog=${COMP_OPTIONS[*]}"
	)

antonellocaroli avatar Apr 16 '23 10:04 antonellocaroli

@antonellocaroli that just prints a period every 0.5 seconds, not really a progress bar since it's not relative to anything. Not sure if tar can even correctly guess how far into the operation it is.

I guess the --checkpoint-action parameter might be usable to contrive something, but this and other approaches I could track down, seem to gobble stdout, which is quite vital to notify you of any files that might have changed while reading...

TheChymera avatar May 24 '23 01:05 TheChymera