Tagged Questions

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
269 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. ...
14
votes
2answers
6k 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
498 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
274 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
288 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
177 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
634 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
123 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
208 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
91 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
4k 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
407 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 : ...
2
votes
3answers
337 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
3k 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
159 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
121 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
465 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
5k 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
313 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
394 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
474 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
182 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
266 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
52 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
693 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
867 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
269 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
4k 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
137 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
282 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
279 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 ...
24
votes
8answers
13k 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
3k 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
1k 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 ...
8
votes
1answer
3k 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
774 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
646 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
196 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 ...
2
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 ...
4
votes
1answer
4k 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
589 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
784 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 ...