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.

learn more… | top users | synonyms

3
votes
1answer
3k views

tar Exiting with failure…?

i'm untaring with this command tar -pxvzf filename.tar.gz an everything seems to be going fine but, it unexpectedly exits with the error below. Is there a reason why I'm receive this error and / or ...
6
votes
1answer
2k views

tar padding with zeros

When performing a tar on a bz2 compressed file I am encountering the following error, tar: dump.sql: File shrank by 19573448400 bytes; padding with zeros Can anyone point what might be causing this ...
-1
votes
4answers
261 views

extracting files from tar

tar -xvf company_raw_2012-03-16.tgz --directory=/root/test --strip-components=4 I am using the following tar option to remove the leading directories and it is working as expected. ...
1
vote
2answers
683 views

How to untar a single file from an archive with randomly generated directory names?

I'm trying write a script that will download a tarball from github and extract a single file from it. However the top level directory inside the tarball has some random characters in it, which I ...
-4
votes
3answers
266 views

Any reason for «tar: Can't specify both -x and -t»? [closed]

Question is due curiosity mostly… — it's kinda strange and awkward limitation considering tar's inability to list content w/o reading the whole (sometimes huge) file.
0
votes
1answer
239 views

tar from tape never finds directory I want

I'm a newbie when it comes to working with tape backups. I'm trying to extract a directory from a tape archive, and not getting much success. The directory on the tape is of the format ...
1
vote
1answer
337 views

Make rsync working with compressed target or tar creating no increment files

I need to make a backup on my external hard drive. I looked both at rsync and incremental tar. The problem is that I want my backup to be compressed. With rsync I can only compress the data transfer, ...
2
votes
1answer
85 views

Linux - Splitting a backup into two steps

I create a tarball using tar zcf arhive.tar.gz dir/ and this works ok. Now I wanted to split this into two simple archives, one only for images, the other -- for everything else. It seems that ...
0
votes
2answers
647 views

How can I make monthly backups (with dated file names) using Cron on Debian?

I'm having trouble adding the date to the backup file's filename. Here's the Cron command (for testing): */2 * * * tar -zcf /var/backups/www-(back tick)date +%Y%m%d(back tick).tgz /var/www/ It should ...
1
vote
1answer
903 views

Install Old Version of PHP on Centos 6

I am trying to install php 5.2.17 on a CentoOS machine. Having problems as I have only used yum in the past. I have the file downloaded and unpacked...not clear on how I need to ./configure before ...
5
votes
2answers
7k views

Compress every file in a directory into its own compressed file

How do I compress every file in a directory into its own tar whilst preserving the name for each file? i.e. file1.out file2.out --> file1.out.tar.gz file2.out.tar.gz
3
votes
2answers
504 views

tar specific number of file

I have a directory with 27K files, I would like to tar them into multiple INDEPENDENT tar files, each will have 5000 files and the last one, will obviously have 2K (27K is not dividable by 5). What ...
2
votes
1answer
167 views

How to remove a certain folder when tar zipping?

I want to remove a folder when I'm creating a tar.gz file as it's for a backup and it takes too much space and is not required I am using the following command; tar -cvzf ...
0
votes
1answer
130 views

Use tar to exclude one directory (but not another) that matches a pattern

I'm working on doing a pretty straightforward tar for a site, but there's a wrinkle. Here's the file structure of the site: ... files/ images/ images/visitors/ ... logs/ ... ...
3
votes
4answers
2k views

Linux - Bare Metal Restore from a Tar file

I make a backup of my Debian webserver on a daily basis. A full backup on Sunday, and differentials each other day of the week. The backup is made with Tar. I backup the whole system into the Tar ...
3
votes
4answers
6k views

How to list the files on a tape with tar?

On a HP-UX OS I have a backup on a magnetic tape created from the SAM. Everywhere I read the instructions to list-verify the contents of the tape is to use the TAR program: #tar tvf ...
4
votes
2answers
998 views

How to tarball a directory without carrying over /path/to/folder?

Example command: $ tar -cvjf destination.tar.bz2 /path/to/folder/source I'd like the final destination.tar.bz2, when extracted, to not include a /path/to/folder/ file directory. It seems inefficient ...
5
votes
2answers
10k views

tar - Remove leading directory components on extraction

How can you extract only the target dir and not the complete dir tree? compress tar cf /var/www/site.tar /var/www_bak/site extract tar xf /var/www/site.tar -C /tmp This will produce: ...
1
vote
2answers
404 views

tar to tape and file with encryption

I am trying to encrypt our tape backups, using tar and openssl but also write to a local file, so far I have : tar --total -czp ./tmp ./home | tee /tmp/Archive.tar.gz | tee > /dev/nst0 I'm not ...
2
votes
2answers
838 views

Use wildcard in tar with -T option

I have a backup script that has this syntax "tar -czvf backup.tar.gz -T filelist" In this filelist, I'm listing folder to backup, but I also need to backup every file that has a given extension like ...
2
votes
3answers
1k views

encrypt tape files with openssl and tar

I am trying to add encryption to my current tape backup scripts by piping the output through openssl, at the moment I have : tar -czpvf /dev/nst0 /home /otherdir so adding openssl gives this : tar ...
3
votes
1answer
589 views

Does tarring up small files into one big tar file before writing them to tape increase the level of data loss when an error occurs?

I've been looking at our backups recently and noticed that the tape throughput is a lot lower when writing lots of small files, so was thinking of tarring those small files up into one big tar file ...
0
votes
3answers
1k views

zip does not work for big files

What is the best way to compress a file if it is more than 4 GB in size? I am using the following for last several months. mysqldump --all-databases | zip > mybackup.zip Today I am got an ...
1
vote
1answer
491 views

Why does tar -c dir | pigz > /mnt/nfs/dir.tgz use network, then cpu in cycles instead of both at once (with one bottlenecking)

I want to transfer a multi-terabyte directory to an nfs mounted directory most efficiently over a 1Gbit network (probably the limiting factor) 3 options - tar and compress in place, then copy copy, ...
2
votes
2answers
6k views

How to exclude files from TAR archive using regular expressions?

I have a simple question, yet I can't find or solve the answer. I want to make a tar archive, but I want to exclude some files from it using regular expression. Example of the file to exclude is ...
3
votes
1answer
144 views

verify integrity of encrypted tar

I'm using tar along with openssl to create encrypted tar archives of some large directories (about 30GB). What is the possibility of corruption in this process, and how would I verify that the ...
4
votes
3answers
5k views

How to convert a TAR file into an ISO file

I have a Linux TAR file that I would like to convert directly into an ISO. Is there a way to do this, preferably, without having to extract the contents of the file first? This would be similar to ...
1
vote
1answer
44 views

Tar: create new archive from filtered archive

I need to create a new tar archive from the filtered output of the original. I thought something like this might work: tar xvpf myarchive.tar --exclude=foo* | tar cvpf mynewarchive.tar but that ...
2
votes
3answers
318 views

Bandwidth-friendly backup strategy using tar?

We've used tar to backup and compress (gzip) selected directories on our file server with very good results until recently. Each and every one of our backups are stored on mirrored (RAID) harddrives ...
3
votes
1answer
232 views

Is there a quick way to get the very last file in a large TAR?

Let's assume I have a several gigabyte tar file, but I also happen to know that the very last file written to the archive is something important that I need. Since tar files are appended ...
0
votes
2answers
59 views

Update and synchronize servers

I have two servers.. One has websites running and other have backup of those websites.. I need to synchronize the servers every week such that the files that were updated or changed after the previous ...
0
votes
1answer
61 views

TAR + create the dir under specific location

I must to run the tar command only under /var/tmp in my Linux machine ( red-hat linux ) so I run the tar command. And directory "KIT" created under /var/tmp in place under /var/tmp/DIR/ What to ...
2
votes
1answer
929 views

How can you designate an arbitrary leading path when adding files to a tar?

Is it possible to set an arbitrary path within a tar archive to place files which may not exist on your original filesystem? This differs from the -C switch in that I may want to take a back up of ...
2
votes
0answers
267 views

Umlaut encoding: tar on Mac Lion

I have a tar archive created on an old Unixware machine using ISO8859-1 encoding. When I try to extract it under Macosx Lion, I experience a bit of weirdness with German umlauts. For instance: I open ...
4
votes
2answers
2k views

CentOS 5.6 Update Version Of Tar

I am running CentOS 5.6 and for some ungodly reason, the version of tar is from 2004, and not compatible with the node package manager (NPM). How in the world can I update it? Is there an additional ...
0
votes
2answers
415 views

CRC Failed, File is broken, using php system command to tar a directory

Can anybody see a problem with the below PHP code? Or have any ideas to troubleshoot a solution as to why whenever I download the backup file.tar.gz and try to open it using 7zip on windows... that I ...
1
vote
1answer
215 views

update tar archive in the relative directory

when I want to create a tar archive in a relative path, I can do this: tar cf archiveName.tar -C relative/path someDirectory but when I want to update the archive, this tar uf archiveName.tar -C ...
1
vote
2answers
712 views

Quick and Easy Backup of Remote Server?

I'm switching from a slower remote server to a faster one. (In a nutshell.) Everything seems to have been migrated properly, but just incase some things didn't get transferred properly, I'd like to ...
0
votes
1answer
451 views

Update default tar location (CENTOS) [closed]

Im not a linux admin by far but ive been playing with node lately... a package im trying to use wasnt happy with b/c tar and i found i was running tar (GNU tar) 1.15.1 i downloaded the new version to ...
7
votes
2answers
612 views

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 ...
1
vote
2answers
230 views

Compress streaming data before sending

The following is working as expected. Sending server: mysqldump db_name tbl_name -d | nc -l 1234 Receiving server: nc 10.10.10.114 1234 | mysql -uroot -proot@123 test When I am dumping to ...
0
votes
2answers
76 views

Compressing directories on server without ssh

Is there a way to compress directories on a server without ssh access? We are transferring many domains and there is no ssh available on the current server. We would like to secure copy the ...
1
vote
2answers
6k views

Check integrity of .tar.gz backup

If you backup your system and create a .tar.gz with thousands of files and directories, how do you easily check its integrity? (ie without having to decompress). It's good to keep backups, but it's ...
0
votes
3answers
134 views

Uncompressing gzip file

I have compressed a folder using following command: tar czvf arch.tar.gz dirname/ When I try to uncompress it using following command tar xvfz arch.tar.gz then it uncompress folder but contents ...
3
votes
2answers
996 views

tar incremental backup with --listed-incremental does not work for me (Linux, Ubuntu)

according to http://www.gnu.org/software/automake/manual/tar/Incremental-Dumps.html, i try to create incremental backups with tar and --listed-incremental on my Ubuntu, but the --listed-incremental ...
12
votes
2answers
32k views

Can I extract a specific folder using tar to another folder?

I am new to the world of Linux and seem to have run into a stumbling block. I know I can extract a specifc archive using the command tar xvfz archivename.tar.gz sampledir/ however how can I extract ...
0
votes
1answer
211 views

Can I extract a file or directory using the tar command and provide it a specific name I want it extracted as? [duplicate]

Possible Duplicate: Can I extract a specific folder using tar to another folder? I am new to world of Linux and would like to know if I can extract a specific file or directory by giving it ...
1
vote
2answers
1k views

What happens if you use the command tar tvf as opposed to tar tvfz?

I am new to the world of Linux and in the process of setting up a Linux environment. I stumbled across the tar command as I need to view the contents of a file prior to extracting it and by accident ...
1
vote
2answers
149 views

MySQL needed to download in order to compile from source?

I have Slackware 13.1 and due to some bugs on the current version of the MySQL it comes with, I have to upgrade it. Since Slackware does not have 5.5 and I am upgrading I have decided to go with ...
0
votes
2answers
431 views

tar too slow when file doesn't exist!

I have a gigantic list of files on a text files. This list is passed to tar, like this: cat list.txt | xargs tar rvf archive.tar --ignore-failed-read The problem is that some files that are on the ...