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

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
439 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 ...
0
votes
1answer
602 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 ...
38
votes
8answers
32k 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 ...
12
votes
1answer
5k 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
830 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
755 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
216 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
835 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
142 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
479 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
398 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
538 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
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
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
114 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
647 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.
5
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
422 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 ...
52
votes
7answers
67k 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
564 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 ...
8
votes
3answers
13k 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
373 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
661 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
134 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 ...
9
votes
4answers
7k 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
113 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
1k 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...??