Questions tagged [tar]

GNU tar creates and manipulates archives which are actually collections of many other files; the program provides users with an organized and systematic method for controlling a large amount of data.

GNU tar creates and manipulates archives which are actually collections of many other files; the program provides users with an organized and systematic method for controlling a large amount of data. The name “tar” originally came from the phrase “Tape ARchive”, but archives need not (and these days, typically do not) reside on tapes.

347 questions
8
votes
2 answers

Transfer a 30GB tar file from one remote server to another - restrained by disk space

I have a 38GB "Moodle" tar file that I need to transfer from the old server (Shared hosting), which we can call "Server A" to the new server (Dedicated virtual), or "Server B". I'm with Mediatemple if that helps. I've already tarballed the directory…
alexbass
  • 83
  • 3
8
votes
3 answers

How can I extract from this tar file when my file may be corrupt?

When attempting to extract all files from a tar file, I get the following error message: tar: Skipping to next header tar: Error exit delayed from previous errors Some of the files extract properly before this error message is printed, and the…
Scottie T
  • 245
  • 1
  • 5
  • 10
8
votes
1 answer

compare tar content with local folder

I want to compare the content of a tar archive (backup of $HOME) with the content of my local $HOME to see whether there are files in the tar file which are not yet in the local filesystem. What is the best way to do that? I tried tar -dvf…
dAnjou
  • 183
  • 1
  • 1
  • 6
8
votes
2 answers

Mount a tar file - not possible?

It seems one cannot mount a tar file (read only), similarly as one mounts an ISO image file. At least, I have not found any implementation. It would be useful, for example to run a find command inside. Is this really (or practically) impossible to…
leonbloy
  • 2,118
  • 17
  • 23
7
votes
2 answers

In tar how can I exclude dir contents but leave empty dir

I want to create a tar file excluding certains folders who have many sub-folders and files, but leaving only the main folders that's being excluded. Explaining: -project |-dir1 |-dir2 |-cache |-logs |-dir3 --dir4 I want my tar to…
Nelson Teixeira
  • 225
  • 1
  • 3
  • 15
7
votes
1 answer

Absolute recursive tar without parent directories?

I have a directory structure that looks something like…
Jake Wilson
  • 8,814
  • 29
  • 97
  • 125
7
votes
3 answers

Un-tar a specific directory inside of a tar

I have the Wordpress tar, latest.tar.gz. Within it is the following structure /wordpress/dirtories/files When I do the following command I would prefer if I could have it unpack starting at /directories/ and not /wordpress with the goal of…
Marc
  • 405
  • 2
  • 5
  • 11
7
votes
2 answers

Can I throttle tar without ionice?

My tar command tar --remove-files -cvif 2011-08-02_14-05-09.tar 2011-08-02_14-05-09 Writes 80MB/s. That's beyond the capacity we can spare because MySQL starts queuing up writes and eventually we get monitoring alerts cause systems won't wait…
kvz
  • 402
  • 4
  • 15
7
votes
2 answers

Correct way of using the --remove-files option with TAR

What is the correct way to use the --remove-files option when using tar? Is it... tar -cfvj --remove-files archive.tar.bz2 archive/ Or... tar -cfvj archive.tar.bz2 archive/ --remove-files
chattsm
  • 329
  • 2
  • 3
  • 7
7
votes
9 answers

Copy 10 million images in a single folder to another server

Now I know you shouldn't ever put 10 million files into a single directory to begin with. Blame it on the developers, but as it stands that’s where I am at. We will be fixing it and moving them into folder groups, but first we gotta get them copied…
The Digital Ninja
  • 764
  • 4
  • 10
  • 25
6
votes
7 answers

Backup - rsync or tar

We're looking to backup about 100gb+ of data containing small files (10kb+) each. The backup needs to be done as fast as possible to another harddrive weekly. Which is the better (especially speed wise) way to backup in such scenario? Rsync, or tar?
Paatrick
6
votes
2 answers

Is it possible to exclude empty directories when creating a tar?

I have a backup command which looks like this: tar cvpzf /backup/incremental-$now.tar.gz --after-date='1 day ago' -C / etc/ home/ root/ --exclude-from=/root/exclusion_list.txt --warning=no-file-unchanged > /backup/log-$now.txt 2>&1 The problem is…
entropid
  • 275
  • 1
  • 3
  • 8
6
votes
1 answer

Can I get tar to not use the filesystem cache when reading files?

We have a cronned job on a production web server that requires tarring up files from across the filesystem. It runs for about 105 minutes, and during that time, Apache starts swapping because all that reading of a few gigs of files has expanded the…
Andy Lester
  • 740
  • 5
  • 16
6
votes
6 answers

tar leading period slash

tar czf dist.tgz --exclude=".gitignore" . This creates files in tar with leading "./" which later turns to problem when server needs to extract parts of tar. Could someone tell me how to pack it so that wont have leading "./"?
Aram
  • 161
  • 1
  • 1
  • 3
6
votes
3 answers

Can't extract tar file on Linux server

In 7-zip file manager I created a tar file (with many subdirectories and files inside). I uploaded this file to the Debian server but can't extract: tar -xvfz files.tar gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not…
user1406271
  • 1,071
  • 4
  • 14
  • 20
1 2
3
23 24