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

1
vote
1answer
17 views

Restore data from tapes made on old irix system (on linux)

Hey guys I'm looking for some help. I'm trying to get the data off of some old SDLT tapes probably 11+ years old. I don't know anything about them besides they were made on an irix system and I do not ...
3
votes
1answer
1k views

Filename encoding switched to UTF-8 by tar when untaring to Windows share

We have different Magento installations (webshop) that allows images to be added to a product freely. When an image is added to a product, the file is named in a specific way that sometimes ...
43
votes
8answers
38k views

Quickest way to transfer 55GB of images to new server

I currently have two CentOS servers. I need to know how and what the quickest way would be to "tar" up the images directory and SCP it over? Is that the quickest way that I just suggested, because ...
0
votes
0answers
4 views

tar specific files in several different subdirectories [migrated]

I have the following folder structure A |-B | |-C | |-1.log | |-2.log |-10.log |-D |-E |-F |-php.log |-H |-php.log I want to collect all the log files and the php file present ...
0
votes
0answers
14 views

tars with equal content have different checksums

Given are two directories a/ and b/ with apparently equal content, $ diff -Naur a b $ After packing the contents of contents of the directories in to tars, cd a/ && tar cf ../a.tar * &&...
6
votes
3answers
3k views

Different md5sums for same tar contents

I run a test creating two tars from the same dir (its files remained unchanged), and I found that their md5sums were different. I assume there's some timestamp being included in the tar's header, but ...
4
votes
4answers
5k views

How to manually extract a backup set made by duplicity?

I have a set of files on my webserver produced by duplicity software: duplicity-full.20110315T085334Z.vol1.difftar.gz duplicity-full.20110315T085334Z.vol2.difftar.gz duplicity-full.20110315T085334Z....
1
vote
0answers
29 views

How to backup and restore with tar in a software raid 10 configuration?

I've successfully backed up and restored using tar with VPS that were not raided. Now I have a setup at my residence that requires raid, specifically raid-10. If I attempt to restore the tar it fails, ...
0
votes
2answers
58 views

CentOS issue extracting Plesk backup tar

I am currently moving to a new server and have a Plesk backup file in Dropbox made with the Plesk Dropbox Backup extension, the .tar file is around 55GB in size. I have downloaded it to the server ...
1
vote
0answers
43 views

Device busy when reading from tape drive with tar

When I try to read a tar from tape with tar tvbf 2048 /dev/nst0, it returns: tar: /dev/nst0: Cannot read: Device or resource busy tar: At beginning of tape, quitting now tar: Error is not recoverable:...
0
votes
1answer
25 views

Tar file extract everything in archive but one specific folder

I am using tar -xf archive.tar -C /home/user/target/folder (in a bash script) to extract the contents of a specific archive (archive.tar) into the target directory (/home/user/target/folder) so that ...
3
votes
5answers
2k views

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 ...
0
votes
0answers
34 views

tar --listed-incremental includes all directories in each increment?

Given a tree structure with files in it, say: source |-- bar | +-- three.txt |-- baz | +-- four.txt +-- foo |-- one.txt +-- two.txt If I do tar czvf dest/archive-1.tgz --listed-...
0
votes
0answers
29 views

Copying preserving file and directory symlinks and symlink destinations

I have a directory with a bunch of files and symlinks in it, for example (not related to my actual hierarchy): src/usr/bin/ls -> src/usr/bin/busybox src/usr/bin/echo -> src/usr/bin/busybox src/...
0
votes
0answers
53 views

cygwin tar preserving Windows file permissions

In addition to our VM level backups, I would like to have a 2nd backup of certain files that changed in the last 24 hours written to an archive on another server. I have 1 windows and 1 linux server ...
0
votes
1answer
41 views

Taring mongodump database produce different checksum

(I am french so sorry for bad english) I am trying to backup my mongo database and check for changes with a sha1 checksum. The problem is that the checksum is not the same. $ mongodump --quiet --db ...
0
votes
1answer
32 views

Linux CLI Make a Tar.Gz with Tar.Gz First-level Directories

Currently, I use this command to make tar.gz archives: sudo tar -zcpvf archive.tar.gz directory1 directory2 directory3 Is there a way to compress multiple archives like above, but instead of ...
11
votes
4answers
15k 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 ...
4
votes
2answers
1k views

Tar: avoid archiving of files larger than certain size

I want to archive files (with tar) which are below 3 MB in size. But I also want to retain the directories in which those files exist. (so I cannot use find command). I just want to avoid the files ...
4
votes
4answers
427 views

Corrupt tar (Resulting folder smaller than packed file)

I have an issue with a tarball created on a SuSe 10.3 Server version. The .tar file has a size of 6.5 GB but if I untar it under Ubuntu 9.10 the resulting folder only has a size of 1.5 GB. commands ...
-1
votes
2answers
79 views

Find all files which contain pattern in directory of tar files

I have all tar files in a directory. I want to find some files in tar files without extract all tar files. I know how to work with one tar file: tar tvf abc.tar | grep xyz I want to find in all tar ...
0
votes
2answers
39 views

Running the tar command with the --exclude functionality does not work for directories

I use tar hczf t.tar.gz * --exclude="./test1" where test1 is the name of a directory that I want to prevent from being tarred. Unfortunately, tar still includes the directory test1. How can I have ...
0
votes
1answer
15 views

List files that will be overwritten by tar extraction

Say I have a tarball ~/foo.tar containing foo/ foo/bar.txt foo/baz.txt foo/qux/ foo/qux/corge.txt foo/qux/grauply.txt And in my home directory ~ I have an existing foo directory and the existing ...
1
vote
2answers
161 views

Blob not found: Error when uploading tar.gz to Azure storage container using linux script

Error The portal displays this Blob not found. error This is the XML error I get when I hit the download button <Error> <Code>ResourceNotFound</Code> <Message&...
0
votes
1answer
97 views

How can I check if a directory contains the same files of a TAR archive?

Let's say I have a folder Documents and a TAR file Documents.tar, how to check if the tar file contains the same files that are present in the directory? The more obvious solution to me would be to ...
3
votes
4answers
411 views

Would rsync be better than tar, wget and untar?

I am migrating to a new server and, as well as html/php files, have a directory which contains around 90,000 files totalling 24GB in size which needs to be moved. When I did a test migration, I used ...
0
votes
1answer
46 views

Exclude directory when creating tarball

I am trying to exclude a directory from getting tarballed. I have tried many combinations but the cache directory is still getting added. The directory I want to tarball is: /var/www/vhosts/latest/...
0
votes
0answers
100 views

Docker daemon can't import tar with duplicate files

I've been following this tutorial to create a docker image from a buildroot environment: https://blog.docker.com/2013/06/create-light-weight-docker-containers-buildroot/ Basically, the steps are: ...
2
votes
1answer
41 views

Archiving bunch of files in the fastest possible way [closed]

I'm implementing a torrent downloading and archiving system. I want to download a torrent file (which contain several small files) and then archive it. My Disk performance is poor. so i want an ...
3
votes
3answers
2k views

cpio VS tar and cp

I just learned that cpio has three modes: copy-out, copy-in and pass-through. I was wondering what are the advantages and disadvantages of cpio under copy-out and copy-in modes over tar. When is it ...
5
votes
7answers
2k views

running tar completely locks up mysql

I am having a seriously weird issue. If I tar some random directory with many files or a single large file tar -pcvf files.tar /var/log, mysql gets completely locked up and all mysql connections get ...
2
votes
8answers
3k views

Deleting all executables in a directory in Linux [closed]

Before I recursively tar a directory i want to be able to delete all of the executables. In windows I would have simply deleted all of the files with .exe extensions. And I cannot simply delete all ...
4
votes
3answers
9k views

How do you only tar files in a directory based on a specific file name?

I want to create a tar ball and include only the files in the directory that start with a specific filename. For instance I have apples-x.x.x and oranges-x.x.x, and I only want to tar the files ...
1
vote
2answers
59 views

Most side effect-free way to archive a large file while it is being modified

I am looking after an application that generates a large amount of data in a log file (about 5G a day) on a Red Hat server. This process runs for 24 hours during the week, so there is no point in the ...
2
votes
3answers
6k views

Getting errors while making backup of whole centos with tar

I am trying this command tar cvpzf /TEMP_BACKUPS/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/tmp --exclude=/TEMP_BACKUPS --exclude=/mnt --exclude=/sys / > /TEMP_BACKUPS/mylog.txt ...
1
vote
1answer
106 views

gzip select directories into separate archives

How would I go about compressing a list of directories into separate archives? I have read solutions that just archive all the directories within a given dir, but there are some I want to skip. ...
0
votes
1answer
360 views

wget and pipe to tar in the background

I am trying to download a large file which is .tar.gz and (> 2GB) in size. The bash script also does lots of other things, so I want to kick off the download and then continue processing other ...
0
votes
1answer
319 views

bsdtar vs gnu tar - sparse files

I've been working with qemu raw images and I just had a few questions about using tar with them. From what I've read, bsdtar with kernel >= 3.1 is able to handle the sparse image files much quicker ...
0
votes
2answers
74 views

Tar content without a specific directory

I have a magento installation I would like to tar. As some of you may now, in the root directory of a Magento installation is a directory called "media". This is the directory where all product images ...
0
votes
1answer
111 views

zip of files with extended attributes

I need to archive and compress a large number of files but some of those files may have extended attributes whose content I don't want to lose. My understanding is that zip doesn't do that. Is there ...
4
votes
5answers
5k 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 ...
0
votes
3answers
398 views

Create tar file on Solaris and untar the file on Linux is it right?

I want to create tar file on Solaris (Solaris 10 ) as Kit.tar and untar the Kit.tar on Linux machine ( linux red-hat 3/4/5 ) Can we be safe with that untar process on Linux machine? , I want to be ...
2
votes
2answers
95 views

Segmenting mysql backups using tar

In addition to using mysqldump, I've been backing up my mysql server by tarring up /var/lib/mysql for redundancy and convenience. This directory includes ibdata, ib_logfile0, and ib_logfile1 as well ...
0
votes
3answers
89 views

MySQL Upgrade RPM

I have a centos5.5 system and have MySQL 5.0.27 install. Now I want to upgrade this to MySQL 5.5.28(Latest). I have two questions, What is the difference between RPM(Redhat) which is recommended and ...
1
vote
1answer
437 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 ...
9
votes
8answers
4k views

Is there a smarter tar or cpio out there for efficiently retrieving a file stored in the archive?

I am using tar to archive a group of very large (multi-GB) bz2 files. If I use tar -tf file.tar to list the files within the archive, this takes a very long time to complete (~10-15 minutes). ...
4
votes
3answers
511 views

Which tar file format should I use?

tar can create the archive in different formats. GNU tar, ustar, pax, v7. What would be the best for long time archiving? Is there significant differencies in these formats? I would use the best ...
5
votes
3answers
9k views

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 ...
0
votes
2answers
4k views

TAR command to extract a single file from a .tar.gz

Does anyone have a command syntax for extracting 1 file from a .tar.gz that also allows me to place the extracted file in a certain directory? I have Googled this and get too many variations with a ...
0
votes
0answers
51 views

inconsistent behavior of files created by an archive / ssh / tar command

Working on a deploy script, I ran into issues that I cannot explain. We have a production server (Ubuntu server 10.04), a repository (Gitlab), and a development server (Ubuntu 14.04). I work on the ...