How can I repack .bz2 archive to .xz format, if I want to save datestamp of file and its chmod-chown settings?
I can use any standard tools and xz, lzma, p7zip
You need to break this into two parts
1) Convert from bz2 to xz, which billc.cn answered
2) Fix the ownership, permissions and timestamp of the xz file to match the bz2.
You can simply use
You can add your compression options to