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
1answer
3k views

Correct way of using the --remove-files option with TAR

What is the correct way to use the --remove-files option when using tar? Is it... tar -cfvj --remove-files archive.tar.bz2 archive/ Or... tar -cfvj archive.tar.bz2 archive/ --remove-files
1
vote
2answers
521 views

ssh tar copying - missing files

On copying directory "home" (from remote machine) to local machine using the following command: ssh root@remote.machine 'tar -cz -C /home/*' | tar -zxv The number of files after the transaction ...
0
votes
1answer
177 views

Backup to Tape using tar: How to add file details (time, date, size) to a TAR log?

What is the best way to make my tar log more informative? Cat'ing the log shows what was backed up, but tells nothing about the files last update or size. Eg: tar cvf /dev/st0 foo* > backup.log ...
5
votes
3answers
134 views

Returning A List Of Quoted Files Paths Using Find

I would like to create a tarball that contains files from a directory that have a ctime of less than 30 days. Most tutorials I have found have basically recommended doing something like this: tar cvf ...
2
votes
1answer
333 views

Tar “mode” flag is being ignored

I try to tar a file and set the permissions to 666 using the mode flag. But whatever permission I set, it is simply being ignored. Command: tar xvzf backup.tar.gz --mode=666 -C /home/user/ Till ...
1
vote
1answer
2k views

Create ZIP archive without storing permissions?

I am distributing packaged files in ZIP format. I use the following to create: zip -r distr.zip files/ When expanded on other UNIX system files preserve their permissions as they were when I packed ...
2
votes
2answers
1k views

Linux how to move a large file?

I had an ISO file that was over 4GB. When I tried to copy or move the file from my computer to a USB key, I remember getting some error about the file being too large for the operating system to ...
1
vote
2answers
302 views

Linux: How do I archive select file extensions in an unknown tree

What is the best way to archive select file extensions in an unknown tree. I cannot use exclude options in tar/gzip/rsync as it would be impossible to exclude all possible extension variations. ...
19
votes
2answers
10k views

Fastest way to extract tar.gz

Is there anyway to extract a tar.gz file faster than tar -zxvf filenamehere? We have large files, and trying to optimize the operation.
0
votes
1answer
672 views

Python script take long time to backup folder

I copied this script from some book to make tar.bz2 of some folders for backup. #!/usr/bin/env python import tarfile, os def make_tar(folder_to_backup, dest_folder, compression='bz2'): if ...
3
votes
1answer
513 views

How to show numerical UIDs/GIDs stored in tar file

I've got some troubles with a tar file that holds a backup. It was provided by our hosting provider and contains some strange file permissions. When viewing with tar tvf example.tar I only get the ...
0
votes
1answer
346 views

Using tar on SLES Linux

I am trying to install some package from these instructions: http://www.franz.com/agraph/support/documentation/v4/server-installation.html#header3-25 I run this command: tar zxf ...
0
votes
2answers
196 views

script - extract multiple files

I have 30 tgz files like these: live-3.0.10-20101031.tgz live-3.0.4-20101005.tgz when I extract them it will be extract in to "live" folder.(ie: tar xvzf live-3.0.10-20101031.tgz will extract to ...
0
votes
1answer
797 views

Change only a specific owner when extracting tar archive

I have a tar archive containing two owners, 1000 and 0 : $ tar tfvz archive.tgz drwxr-xr-x 1000/1000 main/ drwxr-xr-x 0/0 main/root_dir/ drwxr-xr-x 0/0 ...
1
vote
2answers
1k views

Untar selected files in .tar.gz file from remote ftp server?

Lets say i have a big backup.tar.gz file in a remote ftp server. I needed some files from it but i dont want to download/untar all of it. Just specific files/folder. normally this is code to select ...
1
vote
1answer
134 views

gzipped tar archive file paths

I am creating a tar.gz file containing some files and folders as follows: /bin/tar cfz /usr/local/backups/mybackup-${DATENAME}.tar.gz /usr/local/backups/db-${DATENAME}.sql.gz ...
0
votes
3answers
221 views

When I extract .tar.gz all of the files within the folders have the .gz suffix

I have recently begun using a VPS and am learning linux along the way. I have compressed a folder using tar, then I gzipped it and used scp to send it to my server. When I decompress using tar -zxvf ...
1
vote
1answer
96 views

can gnu tar detect changed directory ownership?

I'm using tar 1.15.1 (CentOS 5.5) to archive a directory. [www]$ tar -tvzf public_org.tgz 'public/files' drwxrwxr-x root/www 0 2010-12-01 07:33:33 public/files/ -rwxrwxr-x root/www ...
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
4answers
5k views

Tar directory contents without parent and exclude subdirectories/files

Simplified directory structure: /root/test /root/test/dir1 /root/test/dir2 /root/test/dir3 /root/test/dir4 I want to tar /root/test so that when I extract the archive I get dir1 and dir2. I want to ...
2
votes
1answer
2k views

Tar not preserving Owner/Permissions

I have a file system backup in a tar archive, created with: cd / && tar -cpz -f mybackup.tgz usr/local Doing a tar tvzf mybackup.tgz yields: -rw-rw-r-- otto/otto 450 2010-04-15 ...
1
vote
3answers
420 views

tar - swap owners when moving files from dev to prod server

On the Dev server, we have a tree of files all owned by either the "webdev" or "webserv" user. I would like to tar up this file tree and extract it on the prod server, with the change that any files ...
0
votes
2answers
1k views

Differential backup with TAR relative to specific weekday

I want to have the following backup cycle on Debian Lenny: Monday : Full backup Tuesday : Differential backup relative to Monday Wednesday: Differential backup relative to Monday Thursday : ...
4
votes
3answers
448 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 ...
4
votes
4answers
4k 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 ...
0
votes
1answer
167 views

TAR and excluding directory files but kee directory

Noob alert: Can I exclude files in the directory "imagecache" but still make the directory a part of the TAR archive?
0
votes
1answer
126 views

Problem restoring from tar backup: why are there /dev/disk/by-id/ symlinks and how can I avoid them?

I'm trying to make a bare-bone backup system with the most basic tools available on openSUSE 11.3 (in this case: bash, fdisk, tar & grub legacy) Here's the workflow for my scripts: backup.sh: ...
2
votes
1answer
499 views

Why does my external USB hard drive refuse to unmount after transferring large tar files to it?

I recently need to transfer large tar files to an external USB hard drive from one Red Hat ES 5 server to another (neither with network connectivity). Originally I was trying to move ~90gig tar file ...
4
votes
2answers
7k 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 ...
5
votes
2answers
357 views

tar file modified bit (am I being BS'd to?)

I'm working on a project where I'll be using tar to incrementally backup data on a server to a number of tapes. According to a senior co-worker of mine, tar will "set special flags on files so that ...
1
vote
1answer
663 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
2answers
502 views

tar and ssh large file

I have running the following command for 5 hours and still going. mysql has gigabytes of data, but how can I make sure that the following command is actually transferring data. Can someone check the ...
1
vote
2answers
190 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
284 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
53 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
835 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
974 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
274 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
5k 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
379 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
452 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 ...
33
votes
8answers
25k 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
4k 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 ...
11
votes
1answer
4k 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
3k 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
811 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: ...