1

I have few files that were transferred from another server. The files suppose to contain archive of directories with code and data.

files have .tar extension.

When I run:

tar -xvf xxxxx.tar

I get the following result: enter image description here

Content of each directory is: enter image description here

Content of the json file is: enter image description here What is it ? How can I un-archive it ?

2
  • Please don't post text as images. It's not searchable, completely unreadable for people with poor sight and looks bad on high density displays.
    – gronostaj
    Commented Nov 13, 2020 at 7:22
  • Also, I don't understand what's the problem. You have a tar file, you've unpacked it and you're looking at the contents. What's wrong?
    – gronostaj
    Commented Nov 13, 2020 at 7:23

1 Answer 1

2

It's not just a regular archive, but a saved Docker container.

The giveaway is that directory names look like some hashes and there are layer.tar files inside them. I took a guess that it's some kind of layered filesystem. Docker was the first suspect because I know it uses layered filesystems and it's so ubiquitous nowadays.

After some searching I found that saved containers are TARs with a manifest.json, which matches the contents of your archive. I've saved a random Docker container that I have on my computer and it produced this:

$ tar tf /tmp/whatever.tar
013a18f48029b72d928a9ef9168b3e7933440cbcb6623c4b00db474603c59399/
013a18f48029b72d928a9ef9168b3e7933440cbcb6623c4b00db474603c59399/VERSION
013a18f48029b72d928a9ef9168b3e7933440cbcb6623c4b00db474603c59399/json
013a18f48029b72d928a9ef9168b3e7933440cbcb6623c4b00db474603c59399/layer.tar
078838d9d5ade2ef1dccc1edd7d0badcd60e163ad7dc7256e870388dfb716c1a/
078838d9d5ade2ef1dccc1edd7d0badcd60e163ad7dc7256e870388dfb716c1a/VERSION
078838d9d5ade2ef1dccc1edd7d0badcd60e163ad7dc7256e870388dfb716c1a/json
078838d9d5ade2ef1dccc1edd7d0badcd60e163ad7dc7256e870388dfb716c1a/layer.tar
23182d5b7be17ef9f016b96245cf2895f42c58138c8b5e07947dc1a48ca02b8e/
23182d5b7be17ef9f016b96245cf2895f42c58138c8b5e07947dc1a48ca02b8e/VERSION
23182d5b7be17ef9f016b96245cf2895f42c58138c8b5e07947dc1a48ca02b8e/json
23182d5b7be17ef9f016b96245cf2895f42c58138c8b5e07947dc1a48ca02b8e/layer.tar
39c4919fc1b9432491f6d28bc6b9bce1e783d0753711a6fc7c244343c2884114/
39c4919fc1b9432491f6d28bc6b9bce1e783d0753711a6fc7c244343c2884114/VERSION
39c4919fc1b9432491f6d28bc6b9bce1e783d0753711a6fc7c244343c2884114/json
39c4919fc1b9432491f6d28bc6b9bce1e783d0753711a6fc7c244343c2884114/layer.tar
5038f24ecaace860b3059e03397fea2662d62643e4da125177a4804fa5c2270e/
5038f24ecaace860b3059e03397fea2662d62643e4da125177a4804fa5c2270e/VERSION
5038f24ecaace860b3059e03397fea2662d62643e4da125177a4804fa5c2270e/json
5038f24ecaace860b3059e03397fea2662d62643e4da125177a4804fa5c2270e/layer.tar
567adb40948d776b51eec261aced854b92d3bfd5dae37345295f577d6410b561/
567adb40948d776b51eec261aced854b92d3bfd5dae37345295f577d6410b561/VERSION
567adb40948d776b51eec261aced854b92d3bfd5dae37345295f577d6410b561/json
567adb40948d776b51eec261aced854b92d3bfd5dae37345295f577d6410b561/layer.tar
6619901183e894fa17156ba9f1162d1cfaf93b43ee08e7f998ddd1753a1d6f39/
6619901183e894fa17156ba9f1162d1cfaf93b43ee08e7f998ddd1753a1d6f39/VERSION
6619901183e894fa17156ba9f1162d1cfaf93b43ee08e7f998ddd1753a1d6f39/json
6619901183e894fa17156ba9f1162d1cfaf93b43ee08e7f998ddd1753a1d6f39/layer.tar
8c9412ea287f7c3c444f4b1391748a8813822100d9f773e584e14fb03544fd25/
8c9412ea287f7c3c444f4b1391748a8813822100d9f773e584e14fb03544fd25/VERSION
8c9412ea287f7c3c444f4b1391748a8813822100d9f773e584e14fb03544fd25/json
8c9412ea287f7c3c444f4b1391748a8813822100d9f773e584e14fb03544fd25/layer.tar
97a3635dc1d57d304bbb857faccacfb8a006ce9fe7b90c26c51aaaa0590aa6bd/
97a3635dc1d57d304bbb857faccacfb8a006ce9fe7b90c26c51aaaa0590aa6bd/VERSION
97a3635dc1d57d304bbb857faccacfb8a006ce9fe7b90c26c51aaaa0590aa6bd/json
97a3635dc1d57d304bbb857faccacfb8a006ce9fe7b90c26c51aaaa0590aa6bd/layer.tar
b7ca61bb8a36dccc87779be3c16d16213532501c9e8345c46cfe853b20f4c4fc/
b7ca61bb8a36dccc87779be3c16d16213532501c9e8345c46cfe853b20f4c4fc/VERSION
b7ca61bb8a36dccc87779be3c16d16213532501c9e8345c46cfe853b20f4c4fc/json
b7ca61bb8a36dccc87779be3c16d16213532501c9e8345c46cfe853b20f4c4fc/layer.tar
fa82c5bd6477e2a2eed0c13ccf1424c29fc4165a100a251203e24d86e3387c75.json
manifest.json
repositories

Looks familiar, doesn't it?

The files suppose to contain compressed directories.

That's a very inaccurate description.

The "compressed" part just not true. TARs use no compression. They only glue files and directories into a single uncompressed file.

About the "directories" part, that's not accurate too. Docker is a lightweight virtualization solution. What that means is that it lets you run some software in complete isolation from the main operating system ("virtualization") but using some of its components rather than emulating entire virtual computer ("lightweight"). Docker runs on Linux-powered computers (or virtual machines) and containers are such self-contained pieces of software.

In other words, that's not just an archive with data. It's a complete program, possibly with some data, configuration and maybe operating system components. You could import it back into Docker using its load command.

I'd suggest contacting the person who provided you with these container archives and explaining what you're actually dealing with.

2
  • Thank you. Well those tar files were suppose to contain compress directories. Can it be that the directories, were archived from a docker, and that is the reason they look like this ? Commented Nov 13, 2020 at 7:58
  • @Naomi Well, the Docker container certainly does contain a filesystem which consists of files and directories. But it's not just data as I said, but also some programs, utilities, maybe Linux components. And none of them are compressed. Maybe there's another compressed file inside the container, but that would be a very strange way to deliver it.
    – gronostaj
    Commented Nov 13, 2020 at 8:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .