Re: 7zr compress include subdirs?
On Sun, Jan 30, 2011 at 01:33, Hugo Vanwoerkom <email@example.com>
Thanks, Wayne. That's in the manpage. I am not backing up, I want to create an archive with high compression for distribution and this beats them all.
Wayne Topa wrote:
On 01/27/2011 04:28 PM, Hugo Vanwoerkom wrote:
Trying to use 7zr, used example 1 from the man:
7zr a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on archive.7z dir1
But my 'dir1' has subdirs and they are empty when I expand 'archive.7z'.
I note a -r flag but with the warning:
Recurse subdirectories (CAUTION: this flag does not do what you think,
avoid using it)
Anybody know how to include the subdirs as subdirs in the compressed
If you have installed p7zip-full, have you read the README? I ask because I have and would not use this program at all.
- FIRST : DO NOT USE the 7-zip format for backup purpose on Linux/Unix because :
- 7-zip does not store the owner/group of the file
On Linux/Unix, in order to backup directories you must use tar !
to backup a directory : tar cf - directory | 7za a -si directory.tar.7z
to restore your backup : 7za x -so directory.tar.7z | tar xf -
Archive: [🔎] firstname.lastname@example.org" target="_blank">http://lists.debian.org/[🔎] email@example.com
If you are using tar, then try "xz" instead of 7-zip. Both xz and 7-zip use lzma2 compression. But xz command line utility is very similar to gzip/bzip2, so most of the gzip options could be used. In fact tar has a filter also for xz which is 'J'. It can be used just like gzip
tar cfJ something.tar.xz something (that is the same as, tar cf - something | xz > something.tar.gz)
tar xfJ something.tar.xz