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

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
139 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
1k 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
442 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
380 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 ...
6
votes
2answers
4k 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
461 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 Google'd this and get too many variations with a ...
2
votes
3answers
5k 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
1k 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
3k 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
6k 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
96 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
115 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
548 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.
3
votes
2answers
1k 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
390 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 ...
40
votes
7answers
46k 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
535 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
2k 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 ...
3
votes
3answers
8k 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
0
votes
2answers
347 views

Backup: How to place output of 'split' on external drive?

I am trying to back up ("copy") my home directory to an external hard drive so that I can send the computer in for repairs. Naturally, the family external HD is FAT32, which means I have a max ...
3
votes
2answers
403 views

Is it safe to zip/tar hotcopied svn repositories?

We want to store our backups of our svn repositories as a flat file. We'd like to tar/zip the whole hotcopied directory. I know that we could dump it to a flat file but let's pretend that we'd rather ...
0
votes
2answers
126 views

How do i list the contents of a tar file

I tried using -t like the man says, but it just waits. Example $ tar -t archive.tar (nothing)
1
vote
2answers
3k views

Extract duplicity difftar files manually

I have a duplicity backup which i am not able to recover with duplicity. By calling duplicity file:///path/to/backups /path/to/dir, it returns "Local and Remote metadata are syncronized, no sync ...
4
votes
4answers
3k views

tar: How to create a tar file with arbitrary leading directories w/o 'cd'ing to parent dir

Say I have a directory of files at /home/user1/dir1 and I want to create a tar with only "dir1" as the leading directory: /dir1/file1 /dir1/file2 I know I can first cd to the directory cd ...
0
votes
1answer
109 views

Lost data in Tar

I had a tar file which was of size 3.5gb which held all my programming code. I was working with git trying to learn the repositories, so I created this file as a backup, so I could work my code ...
0
votes
3answers
987 views

ssh & tar to incrementally transfer (like rsync)

In a hosting environment that has no rsync client, I'd like to perform an action similar to what rsync does: send only those files that have changed. I would perform this one-liner on the current ...
5
votes
7answers
2k views

fastest backup for large files

what is the fastest way to duplicate a folder contain few files with few hundred megs size and other few megs small files? (say, /var/lib/mysql) cp or tar or rsync or...??
5
votes
8answers
2k 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). ...
1
vote
5answers
7k views

What is the best program to uncompress .tar.gz files on Windows Server 2008?

What is the best program to uncompress .tar.gz files on Windows Server 2008? EDIT: Sorry - 'Best' is very subjective. In my situation speed and the ability to both unzip and untar in one step are ...
1
vote
4answers
3k views

Tar command Solaris version for files larger than 2 GB

We have several files larger than 2GB tared using tar command UNIX version (SunOS 5.5 with last change: 1995!). There is "E" flag to tar files > 2GB. This is how it was been done: rsh sun_server tar ...
10
votes
4answers
4k views

Linux: How to break a large file into smaller files?

I have a giant file (>20 gigs) sitting on my source machine and I need to transfer it to my target machine. For the purposes of this question, let's assume that I do not have network connectivity ...
0
votes
2answers
3k views

How do I fix a broken tar file?

I have a 46GB tar file containing an .img of an old partition. Unfortunately, it produces a 0-byte file when un-tar'ed. The tar file was produced on linux, I'm on windows now. I have tried WinRAR, ...
2
votes
7answers
2k views

Deleting all executables in a directory in Linux

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

Using Crontab to tar a directory at a regular interval

I want to tar a directory at a regular interval (say every morning at 4am) so I was planning on using crontab. How can I have the date be in the filename ie srcdirectorybackup5-30-09.tar so that I can ...
3
votes
3answers
5k 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 ...
7
votes
3answers
5k views

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

How to perform a secure rsync between servers across an unsecured network

Basically what I'm asking is, has anyone come across a means by which to wrap rsync inside ssh. With OpenSSH v4.9+ sftp has some nice options that allow you to chroot the incoming connection and such ...
2
votes
4answers
1k views

Get extracted size from tgz before extracting

Is it possible to get the size that a tgz will take up once it's extracted, but without extracting it? I basically want tar tzf file.tgz with sizes beside them. I'm really looking for a total, so a ...
3
votes
3answers
733 views

Why does “tar -cSf file.tar source” run out of memory?

I'm trying to back up 66 gigabytes to a NAS by making a tarball, but "tar -cSf ..." quits with a "memory exhausted" error after gigabyte 62. My Linux machine has a gigabyte of RAM and a gigabyte of ...