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

9
votes
4answers
4k views

Does tar preserve permissions if user IDs change?

I need to backup some data with the "p" option on tar command. The problem is the place I'm going to restore this data will have all the same users, but those users may have different IDs. Does that ...
1
vote
1answer
30 views

Is there a way for tar to check for new files not in an archive?

Is there a way to for the tar command to check for new files that are not already in the archive, or those that have been deleted (for good measure)?
1
vote
1answer
67 views

tar + tar not open all files

When I want to view the following tar file , then tar show the following three files from /var/tmp tar tvf fix.tar install.sh /usr/cti/apps/swp/dir/script1.sh ...
0
votes
2answers
605 views

Not possible to extract tar.gz archive in Centos

I have just uploaded tar.gz archive to my Centos server from my home Windows 7 computer. Before that, it was extracted from .zip archive. When I try to extract it: tar -xvf file.tar.gz gunzip ...
1
vote
2answers
105 views

Issues while untaring in Linux- tarball created from Solaris

I am getting an error- Unknown file type 'A', extracted as normal file while un-tarring a set of files which has acl permissions set. I had created the tar file in solaris as tar -cpfv ...
4
votes
1answer
95 views

Is it really impossible to prepend data to a tape?

I would like to keep a log of files that I am writing to tape using dd or tar for each file. Then at the end of the run, prepend that log to the beginning of the tape using dd. If it works, I can see ...
0
votes
1answer
397 views

Copy directory structure from Solaris preserving all the permissions and links

I am looking to copy a directory structure with Files, I am not looking for content a 0 byte file will do. I just need to copy the directory tree with 0 byte files and links preserving the properties ...
0
votes
1answer
35 views

Installing multiple mysql as rpm vs tarball

Which is the suitable way to install multiple mysql servers without affecting the current installation in fedora( rpm or tarball)?
0
votes
1answer
237 views

resumable tar over ssh

I'd like to use tar cf - | ssh user@hostname tar xf - to copy a very large set of files. The only problem is that it will be over a very flakey VPN link. Is it possible to somehow set up a resumable ...
0
votes
4answers
130 views

Tar dereference only 1 level

I use the following pseudo-script to create a TAR of my installed software mkdir tmp ln -s /path/to/app1/bin tmp/app1 ln -s /and/path/going/to/the-app-2 tmp/app2 tar -c --dereference ...
0
votes
1answer
47 views

What would be the outcome of tar and untar a constantly changing folder via ssh

I have used this command on a big-sized (TB),constant changing directory with sub-folders and files. $ tar c dir/* |gzip - | ssh user@host 'cd /dir/ && tar xz' What would be the outcome at ...
2
votes
1answer
1k views

Absolute recursive tar without parent directories?

I have a directory structure that looks something like this: /var/www/website/index.php /var/www/website/home.php /var/www/website/whatever.text /var/www/website/.htaccess /var/www/website/images/ ...
5
votes
3answers
3k views

Determine if file is in the process of being written upon?

I need to deploy an automated process (via 1 min cron script) that looks for tar files in a specific directory. If a tar file is found, it is untarred to the appropriate location and then the tar file ...
0
votes
1answer
243 views

Backing up file moves with rsync + tar

I have a mirroring system in place with rsync and it works well. However, moving a file causes it to be transferred again in its entirety. Given what I know about the rsync algorithm's rolling ...
3
votes
4answers
1k views

Cannot set target directory when extracting an archive using tar

I'm trying to extract a tar archive to a specific directory. I've tried using -C flag but it doesn't work as expected. Here is the commandline I'm using tar xvf myarchive.tar -C mydirectory/ This ...
1
vote
3answers
341 views

tar over ssh to IPv6 host

I want to tar to a remote host using the remote host's IPv6 address. I can ssh and scp to the host but GNU tar does not accept the IPv6 address. I tried: tar -cjvf ...
-2
votes
1answer
42 views

Changing tar parameters

I'd like to change the command I'm actualy using to put files in a tar archive in order to achieve this: 1) Remove directories tree from the archive (actually the .tar.gz file mantains the tree of ...
1
vote
2answers
137 views

Run command to untar file in timestamped folder?

I have a .tar file that is transferred to our server every night by one of our client management systems. The file is a compressed .sql file which I need to uncompress and dump into our database. The ...
0
votes
1answer
153 views

How to unpack specific directory from /home backup packed with pigz+tar+gzip

Normally I'm extracting my copies with: pigz -dc backup2_week1_system.tar.gz | tar xzvf - Now I want to unpack specific directory from /home/user for example admin
2
votes
3answers
657 views

tar gzip slowing down server

I have a backup script that: compress some files generate md5 copy the compressed file to another server. the other server finishes comparing MD5 (to find copy errors). Here it's the core script: ...
-1
votes
3answers
1k views

Combine two or more compressed files

I have 2 gz files those I need to merge into one -- that is to say I want to combine two .gz files into one such that when I extract the combined file I get a single file containing the concatenation ...
0
votes
2answers
275 views

copy files with folders [closed]

The following scp is working as expected. scp /home/admin/* root@ec2-50-112-212-73:/ But I need a command that will create the required folder structure on destination server if it does not already ...
4
votes
4answers
308 views

Ultrium 3 tape drive shoe-shining, 3Mb/s: and it's not the cable

I have a HP 960 Ultrium 3 tape drive. Since I got it, (second hand, £90) I've been experiencing shoe-shining. Writing with tar in Linux, I average about 3Mb/s write speed. I've tried replacing both ...
1
vote
1answer
947 views

linux/solaris when to use tar or gtar

is it possible to know when need to use tar or gtar according to tar file for example I have some tar file as sometarfile.tar how to know if need to use tar or gtar command ? is it possible ...
-1
votes
5answers
335 views

Transer a large number of file between two servers [duplicate]

Possible Duplicate: Quickest way to transfer 55GB of images to new server I am migrating from one server to another. I want to transfer the thousands of file from one server to the other. ...
0
votes
3answers
1k views

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 ...
5
votes
3answers
490 views

Linux tar archive without parent structure

I'm trying to modify a certain tar.gz archive I have. When I go to create the tar, it retains the parent directory structure, as a tarball should. However, is there a way to simply create a tar ...
2
votes
1answer
343 views

sudoers not working for tar command

I want to disable the requirement of sudo or running as root for a bash script that does backups with tar. I added this line to my sudoers file username ALL=NOPASSWD: /bin/tar However after I ...
2
votes
1answer
2k 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 ...
5
votes
1answer
977 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
187 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
414 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
179 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
161 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
215 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
78 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
412 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
608 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 ...
4
votes
2answers
1k 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
316 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
163 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
98 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/ ... ...
2
votes
4answers
973 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 ...
0
votes
2answers
223 views

Extract a selected file from a .tbz file

I am on CentOS server. I have to download a .tbz file every day which is of 3GB in size and then i have to extract it and use inner files for further process. There are 48 files in the .tbz extracted ...
3
votes
4answers
3k 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 ...
3
votes
2answers
304 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 ...
2
votes
2answers
1k 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
293 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
315 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
686 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 ...