Page 1 of 1

wimlib without archive

Posted: Sun Jun 25, 2017 7:53 am
by bliblubli
Would it be possible to use wimlib to backup to a directory instead of an archive? Like a wim capture and win extract in one step. It would allow to benefit from wimlib's stability and functionnality to make easily browsable incremental backups from the command line.

Re: wimlib without archive

Posted: Sun Jun 25, 2017 6:00 pm
by synchronicity
It's possible to abuse the pipable WIM support to copy a directory:

Code: Select all

wimcapture src - --compress=none | wimapply - dest
Although, you could just use 'cp -a src dst' instead. (Or 'xcopy /e' on Windows.)

Re: wimlib without archive

Posted: Sun Jun 25, 2017 6:30 pm
by bliblubli
thanks. xcopy doesn't work for long path, robocopy does but doesn't respect hardlinks, making the backup much bigger than the original. Cp also doens't respect hardlinks.

I tried it in powershell and got this output:

Code: Select all

[WARNING] Creating a pipable WIM, which will be incompatible
          with Microsoft's software (WIMGAPI/ImageX/DISM).
Archiving file data: 6668 bytes of 6668 bytes (100%) done
[ERROR] "[fd 0]": Header size is invalid (63 bytes)
ERROR: Exiting with error code 17:
       The WIM header was invalid.

Re: wimlib without archive

Posted: Sun Jun 25, 2017 6:39 pm
by synchronicity
Powershell corrupts binary data; I can't do anything about it. Use cmd.exe instead.

Re: wimlib without archive

Posted: Sun Jun 25, 2017 7:44 pm
by bliblubli
:D awesome. Microsoft is making Linux more attractive every day.

> instead of | seems to work indeed in cmd. However, some strange lines are printed with it:

Code: Select all

ArchiAvpipnlgy ifnigl ei mdaagtea :1  0( "biyntteesl "o)f  f6r6o6m8  "b(yntuelsl )("0 %t)o  ddoinreectory "c:\tmp\"
AErxcthriavcitnign gf ifliel ed adtaat:a :6 666686 8b ybtyetse so fo f6 666686 8b ybtyetse s( 1(0100%0)% )d odnoen
e
It looks like the progress text being somehow different when pipping. But I wanted to be sure everything is looking alright from your point of view?

Re: wimlib without archive

Posted: Sun Jun 25, 2017 10:52 pm
by synchronicity
The output will be garbled because both commands will print their progress lines at the same time. There isn't a --quiet option yet, but you could try redirecting the output of the second command to /dev/null ("nul" in cmd.exe) I guess.

Re: wimlib without archive

Posted: Mon Jun 26, 2017 5:31 pm
by bliblubli
your help is really appreciated :)

Re: wimlib without archive

Posted: Sun Jul 16, 2017 5:04 pm
by synchronicity
wimlib-imagex v1.12.0-BETA2 has a --quiet option now.

Re: wimlib without archive

Posted: Mon Jul 24, 2017 11:48 am
by bliblubli
really much better to read, thanks you :)