12/24/2023 0 Comments Xz decompress![]() ![]() If $input_filename_or_reference is a scalar reference, the input data will be read from $$input_filename_or_reference. The string '-' can be used as an alias for standard input. If the $input_filename_or_reference parameter is a filehandle, the input data will be read from it. This file will be opened for reading and the input data will be read from it. If the $input_filename_or_reference parameter is a simple scalar, it is assumed to be a filename. It can take one of the following forms: A filename The parameter, $input_filename_or_reference, is used to define the source of the compressed data. Unxz expects at least two parameters, $input_filename_or_reference and $output_filename_or_reference and zero or more optional parameters (see "Optional Parameters") The $input_filename_or_reference parameter unxz $input_filename_or_reference => $output_filename_or_reference The functional interface needs Perl5.005 or better. Unxz $input_filename_or_reference => $output_filename_or_reference use IO::Uncompress::UnXz qw(unxz $UnXzError) For finer control over the uncompression process, see the "OO Interface" section. Functional InterfaceĪ top-level function, unxz, is provided to carry out "one-shot" uncompression between buffers and/or files. This module provides a Perl interface that allows the reading of lzma files/buffers.įor writing xz files/buffers, see the companion module IO::Compress::Xz. $status = $z->read($buffer, $length, $offset) My $z = IO::Uncompress::UnXz->new( $input ) IO::Uncompress::UnXz - Read xz files/buffers SYNOPSIS use IO::Uncompress::UnXz qw(unxz $UnXzError) The $output_filename_or_reference parameter.The $input_filename_or_reference parameter.unxz $input_filename_or_reference => $output_filename_or_reference.Maybe I need to prefer fsarchiver or something like them instead of dd, but it is less commonly used and not released as v1.x yet. The setuid, setgid, and sticky bits are not copied to the target file.ĭo I need to worry about command options like -xattrs, -acls in the case when I use a dd | tar pipe?įinally, do I have to always specify the bs attribute of the dd command if I backup entire /dev/sdX and use a compressed file as an intermediate backup location if I want to get the most identical copy of the original device as a result of recovery? In this case, which bs size to prefer? ![]() Since xz 5.2.6, this option also makes xz compress or decompress even if the input is a symbolic link to a regular file, has more than one hard link, or has the setuid, setgid, or sticky bit set. I'm not sure that i don't in the view of this quote from xz's manual: Is the sudo dd if=/dev/sdX | xz -9 -threads=0 -keep -v > pipe enough to save all specified data? And a pipe like xz -dck | dd of=/dev/sdX status=progress to restore the backup? Do I need to worry about metadata (attributes, ACLs, etc)? xz doesn't support copying other metadata like access control lists or extended attributes yet.ĭoes it matter in case I use it in a pipe with dd which copies blocks not files? If copying the group fails, the permissions are modified so that the target file doesn't become accessible to users who didn't have permission to access the source file. But man saysĪfter successfully compressing or decompressing the file, xz copies the owner, group, permissions, access time, and modification time from the source file to the target file. Other option is to use the most modern, efficient and multi-threaded compression tools like xz. ![]() Вesides, I'm not sure gzip can offer the most efficient compression mechanism. I see some options like to use dd | gzip or dd | tar pipe but I'm not sure that this will save all the necessary data in view of this answer. The easiest way is to use dd or even dump utility but we will get big uncompressed file (.iso. What is the most complete way to backup/restore entire /dev/sdX (to/from a file) including device partition table and partition flags, all possible metadata, owners, file permissions, ACLs, creation/access/change times, file attributes (like append only (a) or immutable (i)), xattrs, access rights flags (like setuid, setgid, sticky bit), filesystem-specific attributes, etc if I want to get compressed backup file? /dev/sdX's partitions can be formatted in ext4, fat, exfat, ntfs, different file system for each partition or not. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |