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
2answers
196 views

Linux Performance Question

Some of our application owners are saying several processes are taking double the time to run that they should. This one has our head scratching. We cannot understand why some operations are taking ...
2
votes
1answer
294 views

Cronjob - Godaddy

I'm trying to create a backup from Godaddy's shared hosting envinronment for a friend. The sites entire file is about 2GB, and Godaddy doesn't support archiving files more than 20MB. The only option ...
0
votes
1answer
61 views

need help on extracting a file when checksum matches

I need a help on untaring a file when checksum matches. Here is the scenario. i have a tar file and its check sum is dfsafdafsafasfsaf232, stored in a checksum file and need a script to match this ...
1
vote
1answer
937 views

Extract tar with multiple tars inside?

Is there a way to untar a file with multiple tars inside? It's suppose to just untar everything inside including untarring the tars inside the tar... With windows it does it, quite annoying I can't ...
2
votes
2answers
1k views

Tar exclude not working?

tar -cvf file.tar --exclude=thumbs/ \ --exclude=uploads_event/ \ --exclude=uploads_forum/ \ --exclude=uploads_admin/ \ ...
3
votes
2answers
1k views

tricks for speeding up tar while tarring up a huge directory of little files?

I'm trying to tar up a directory that has about 3M tiny files in it. Tar is chugging along, but I'm thinking its going to take longer than I can wait. I'm wondering if telling tar to not store ...
0
votes
4answers
286 views

Archive (tar) frontend over SSH

I'm looking for an alternative way to the bare tar command to tar/list/untar files on a Linux host over SSH, for using on some shared hosting accounts. Naturally no one has X-Windows or Midnight ...
4
votes
4answers
6k views

Delete original tar after untar? Not enough space to untar

I have a 130GB tar file I need to untar to /storage. Problem is, I don't have enough disk space for both to exist at the same time. How can I untar the tar file, and ensure there is enough disk ...
2
votes
3answers
138 views

How can I perform a command on my server so it keeps running when my Wifi drops

I need to log into my server and tar up a huge directory of about 150GB, but I need to run the command so when I get back home, it's still running. can I just SSH into my server from my laptop, run ...
0
votes
1answer
467 views

not letting me TAR 155gb images directory, keeps giving me error

[root@centosvm01 /]# tar -cvfz --exclude=/storage/thumbs/ /storage/storage.tar /storage/ tar: z: Wrote only 6144 of 10240 bytes tar: Error is not recoverable: exiting now it's 155GB of just images. I ...
1
vote
1answer
672 views

Tar directory gives me error, won't let me tar!

[root@centosvm01 /]# tar --create --exclude="storage/thumbs/" --file="storagebackup.tar" storage/ tar: storagebackup.tar: Wrote only 8192 of 10240 bytes tar: Error is not recoverable: exiting now I ...
39
votes
8answers
35k 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 ...
5
votes
3answers
5k views

How to list content from a tar file without recursion?

I've a tar (gz, bzip) file and want to see its content, but not recursively. This is: The "first level" in the file. I already know how to see content: tar -ztf file.tar.gz But it's recursive!! ...
1
vote
2answers
2k views

Untar with root: is it possible to set the uid?

Is it possible to tell tar to unpack the archive and set the uid/gid to a specific one, when you run tar as root (while using chef) ? Things I already know: I can use -o to extract as root, then ...
13
votes
1answer
6k views

tar: kill the error message: 'tar: Removing leading `/' from member names'

I run this from a cronjob: tar -czvf /var/backups/svn.tgz /var/svn/* That generates this on stderr: tar: Removing leading `/' from member names I would like to avoid this because it is not a ...
0
votes
12answers
1k views

How do you backup your site? [closed]

How do you backup your site? I am especially interested when you have a large site (20GB+) with thousands of files? Is there anything clever than the usual tar -zcvf backup2010.tar.gz ./public_html/ ...
3
votes
2answers
4k views

Linux command line - search a file inside a tar archive

I would like to check whether a file is in a gzip'ed tar archive. For example I want to check whether the /etc/passwd is present in the archive backup_2010-09-27.tar.gz A dumb solution can be: tar ...
0
votes
2answers
837 views

Mail backup error (tar Cannot stat: No such file or directory)

I have got this error in during my mail server backup: 2010-09-16 06:24:20 ERROR backup of /var/mail/vhosts failed: tar: Removing leading `/' from member names tar: ...
0
votes
1answer
53 views

Clarify tar message

I'm doing some tape backup with tar. The backup is running while all services are up. I know that is a bad thing, but i cannot stop them. So, sometimes the tar prints this message: tar: ...
0
votes
1answer
760 views

Help on writing Linux script to backup and ftp files to another server

I am using MySQL as the database system for my application on a Linux system. Every week I update the system and take backups (mysqldump) of the databases changed (2 databases). I then .tar.gz them ...
1
vote
1answer
218 views

Piping a tarball from a unix server to a windows server via SSH

In a past life as a unix admin I would often remotely transfer files by taring them to stdout and piping that output through SSH. Sometimes I placed a "tar -xfp -" on the other end of the pipe as a ...
3
votes
1answer
2k views

Can I nohup/resume an existing tar process initiation in a ssh session?

First, if I stop a tar process, will it resume from where it left off or will it have to go through all the directories again (a lot of directories and files). Second, am I correctly "disown"ing this ...
6
votes
1answer
5k views

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 ...
2
votes
3answers
869 views

diff for binary files

I have a folder with one big file. This is a file that changes each day. Using tar for incremental backups is not a good idea as that big file (each file that is changed is saved) will be copied each ...
0
votes
1answer
1k views

tar can't create hardlink

I have an old redhat linux (7.2) which I'm gonna move to another(vmware) server (from the old one). So I booted new server from DSL Linux liveCD (2003 year - because new linux has't driver for Bus ...
0
votes
4answers
1k views

How to tar.gz *.php, *.txt, *.inc, *.js, *.css, *.php3 files?

I want to backup my server, but not bother with images /videos etc. how can i tar.gz all those types of files i want (basically text files)?
7
votes
9answers
1k views

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

How to recover a server from a tar file

In moodle the LMS you can export courses, as a tar.gz, some one said they were going to give me such a thing. I was suprised by the 6 gb size. I was even more suprised when I extracted it, and found ...
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 ...
1
vote
1answer
491 views

Creating diff from a tar

There is a tar file which was created few days before, this tar file was created on the /files directory. And now /files directory has new files uploaded in it. My question is how to create another ...
0
votes
2answers
401 views

What are the command-line options for un-tarring a tar.gz file to a specific directory?

This is one of those things I don't quite do often enough to memorize. I thought it would be nice to have the answer here so I (and maybe others with as poor a memory as me) can star it. What ...
3
votes
2answers
2k views

Can “tar” backup incrementally?

I have my home folder with a few GB. Is it possible to run tar on it, create a home.tar.gz, and then for changed files, it creates home1.tar.gz only with modified files from previous tar (thus being ...
7
votes
2answers
5k views

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 ...
0
votes
1answer
551 views

Untar multiple files in different directories

am trying to perform an update on multiple site that use an open source CMS but untaring a patch file in each sites httpdocs directory. My plan was to perform a find for the patch file then untar ...
2
votes
3answers
1k views

Concurrent modification during backup: rsync vs dump vs tar vs?

I have a Linux log server where multiple applications write data. Data is written in bursts, and in a lot of different files. I need to make a backup of this mess, preferably preserving as much ...
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 ...
1
vote
3answers
6k views

tar a directory and only include certain file types

Following the instructions here: http://linuxdevcenter.com/pub/a/linux/lpt/20_08.html I'm aiming to tar up a directory but only want to include .php files from that directory. Given the ...
1
vote
4answers
2k views

Best choice for off-site backup: dd vs tar

I have two 1TB single-partition hard disks configured as RAID1, of which I would like to make an off-site backup on a third disk, which I am still to buy. The idea is to store the backup at a ...
5
votes
5answers
4k views

“Stream” tar action from remote server through Putty?

I am accessing a shared hosting account through Putty / SSH. The account is pretty full, 300 MB below its quota. I need to make a full backup of all data present on the account. Creating a bzip2 file ...
2
votes
3answers
7k views

“tar cfz” versus “tar cf - | gzip”: are they different? (or how to improve a backup)

I want to speed up my backup done with tar cfz, the common way to do it. But day by day my backed up files grow so it becomes slower. I was thinking to take advantage of the several cores available ...
1
vote
1answer
120 views

*.tgz not extracting properly

I've just received some files *.tgz... I've tried tar -xvzf file.tgz... However I'm getting error "Attempt to write to an empty file"... Am I missing something... The folder directory system has been ...
1
vote
2answers
120 views

Tar only logfiles for all sites on server

I need to transfer all of the log files off of a server and hope someone can help me. I'm pretty stuck. The directory and file structure is like so. ...
1
vote
3answers
660 views

How can i make a tar of selective file type under a directory

I want to take backup of selective files say *.py under a directory. How can i do that? Please help me to achieve it.
6
votes
2answers
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
425 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 ...
0
votes
3answers
2k views

bash one-liner loop over directories throws errors

I'm trying to build a bash one-liner to loop over the directories within the current directory and tar the content into unique tars, using the directory name as the tar file name. I've got the basics ...
56
votes
7answers
71k views

mysqldump to a tar.gz

Usually after dumping a MySQL database with mysqldump command I immediately tar/gzip the resultant file. I'm looking for a way to do this in one command: So from this: mysqldump dbname -u root -p ...
1
vote
2answers
567 views

exclude directory with tar command

T would like to use the tar command in Linux to back up some files, but i would like to exclude a specific directory from the archive. How can I do that?
2
votes
7answers
3k views

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 ...
9
votes
3answers
14k views

Linux gzip multiple subdirectories into separate archives?

How would I be able to compress subdirectories into separate archives? Example: directory subdir1 subdir2 Should create subdir1(.tar).gz and subdir2(.tar).gz