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

4
votes
5answers
3k views

Cannot set target directory when extracting an archive using tar

I'm trying to extract a tar archive to a specific directory. I've tried using -C flag but it doesn't work as expected. Here is the commandline I'm using tar xvf myarchive.tar -C mydirectory/ This ...
1
vote
3answers
115 views

Create tar file on Solaris and untar the file on Linux is it right?

I want to create tar file on Solaris (Solaris 10 ) as Kit.tar and untar the Kit.tar on Linux machine ( linux red-hat 3/4/5 ) Can we be safe with that untar process on Linux machine? , I want to be ...
2
votes
2answers
80 views

Segmenting mysql backups using tar

In addition to using mysqldump, I've been backing up my mysql server by tarring up /var/lib/mysql for redundancy and convenience. This directory includes ibdata, ib_logfile0, and ib_logfile1 as well ...
0
votes
3answers
88 views

MySQL Upgrade RPM

I have a centos5.5 system and have MySQL 5.0.27 install. Now I want to upgrade this to MySQL 5.5.28(Latest). I have two questions, What is the difference between RPM(Redhat) which is recommended and ...
1
vote
1answer
367 views

resumable tar over ssh

I'd like to use tar cf - | ssh user@hostname tar xf - to copy a very large set of files. The only problem is that it will be over a very flakey VPN link. Is it possible to somehow set up a resumable ...
8
votes
8answers
3k 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). ...
4
votes
3answers
423 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
3answers
6k 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 ...
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 ...
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
0answers
37 views

inconsistent behavior of files created by an archive / ssh / tar command

Working on a deploy script, I ran into issues that I cannot explain. We have a production server (Ubuntu server 10.04), a repository (Gitlab), and a development server (Ubuntu 14.04). I work on the ...
0
votes
1answer
65 views

Create tar on remote server and send it back over SSH

All the scripts I've seems to be pushing code from server to a backup server, I am trying to set the backup server to pull code from a live server. I've managed it with the sql: ssh -C ...
4
votes
2answers
499 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
1answer
38 views

Archiving large number of files with TAR

Trying to clean up a directory on an HP/UX system that has a stupid number of files. I've already tried: Create an archive of all files older than "x" days. (This method, using the find command, even ...
31
votes
8answers
21k 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 ...
3
votes
1answer
139 views

Cannot extract .tar.gz archive in bash

I am in my /w dir and I saved the .tar.gz archive from the MediaWiki server like this: $ cd /public_html/w $ wget releases.wikimedia.org/mediawiki/1.24/mediawiki-1.24.1.tar.gz But once I try to ...
0
votes
1answer
91 views

Pipe multiple files into one tar gz

I'd like to call mysqldump to create multiple backup files and then archive them in one tar.gz. I am following this tutorial on mysqldump part: ...
0
votes
1answer
698 views

Unable to Unzip a tar.gz.bz2

We run daily backups of our MySQL server. Using the following script: [ ! -d "${DEST}" ] && mkdir -p "${DEST}" FILE=${DEST}/mysql-live.${NOW}-$(date +"%T").tar.gz.bz2 # get around error ...
1
vote
1answer
57 views

tar wildcards in files-from

Trying to run tar with --files-from. I have a file files.txt that contains /dir1/files*.txt However it complains that /dir1/files*.txt does not exist, but ls proves that it does. I tried to also ...
3
votes
1answer
105 views

In tar how can I exclude dir contents but leave empty dir

I want to create a tar file excluding certains folders who have many sub-folders and files, but leaving only the main folders that's being excluded. Explaining: -project |-dir1 |-dir2 |-cache ...
47
votes
7answers
56k 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 ...
3
votes
2answers
573 views

BackupPC Taking over 72 hours to backup 250GB's

I am using BackupPC to backup some workstations at the office. One workstations in particular has a sizable amount of data when compared to the rest, however, it's not that large in general (talking ...
1
vote
1answer
198 views

s3cmd: on-the-fly backup

To do backups I created a script that makes an archive of all the folders I need to backup, sends it to S3 (through s3cmd) and then deletes it after upload has been completed. I'm looking for a way ...
0
votes
0answers
450 views

Unexpected EOF write error

We have a Sun Solaris 10 server that is failing to backup using tar to write to tape. tar cEf /dev/rmt/0cn . The complete error is tar: write error: unexpected EOF tar error code 2 The ...
4
votes
1answer
287 views

Should I exclude all 'dev/' or only 'dev/pts/' during full server tar backup?

I'm curious why in all backup tutorials I found tar command excludes among others /dev/pts and not all of /dev/ Why would I want to backup anything under dev?
2
votes
2answers
207 views

Shell command to filter out non-existing files in a pipe

I'm looking for a nice way to generate a backup tar.gz of what is going to be overridden by the extraction of another tar.gz. tar -ztf patch.tar.gz | grep -v "/$" | tar -T- -zcvf backup.tar.gz This ...
-2
votes
2answers
60 views

Deleting file in tar mounted with archivemount?

archivemount allows rw-mounting tar archives. What happens when I delete a file? Is it actually removed from the tar archive? Is a delete flag set? If the file is actually removed, then I assume the ...
1
vote
2answers
251 views

scp with tar pipe and continue proceeding if shell is closed

I am trying to send my files to another server with this command: tar zcvf - /var/www/html | ssh root@x.x.x.x "cat > /backup.tar.gz" And I want to send it to background with this commands ...
0
votes
1answer
176 views

Piping stream into tar on FreeBSD

I am trying to pipe a tar/gzip archive into tar to decompress it. The script I have is part of a self extracting installer, where my archive is appended to the script. This works fine on linux, and ...
2
votes
1answer
836 views

How can you designate an arbitrary leading path when adding files to a tar?

Is it possible to set an arbitrary path within a tar archive to place files which may not exist on your original filesystem? This differs from the -C switch in that I may want to take a back up of ...
1
vote
4answers
712 views

How to restore a backup from a tgz file in linux

How can i restore from a backup.tgz file generated from another linux server on my own server? I tried the command the following command: tar xvpfz backup.tgz -C / The above command worked, but it ...
-2
votes
1answer
349 views

Resume a tar command that was stopped

I am trying to tar a huge directory (with about 600GB) and sometimes my SSH conection drops and I need to execute the tar code again and my linux overwites the previous file beginning all the tar ...
0
votes
1answer
297 views

dd unable to write to tape drive

I'm trying to dump our online backups to tape; for obvious reasons I want to encrypt the data on the tapes, so to write to the tape I need to tar everything up, pipe that to openssl to encrypt it, ...
8
votes
3answers
8k views

Determine if file is in the process of being written upon?

I need to deploy an automated process (via 1 min cron script) that looks for tar files in a specific directory. If a tar file is found, it is untarred to the appropriate location and then the tar file ...
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
178 views

Faster picking of files from a tar archive

We've got a collection of servers that we're backing up using Duplicity. We're trying to build some functionality for our staff so that they can select a file and view the available versions for ...
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 ...
11
votes
4answers
8k views

Does tar preserve permissions if user IDs change?

I need to backup some data with the "p" option on tar command. The problem is the place I'm going to restore this data will have all the same users, but those users may have different IDs. Does that ...
0
votes
1answer
49 views

Tar Server correctly for migration without messing up network configurations

I have a vps server that I would like to backup using tar. I currently use this command to do so, and it works very well for me right now. tar cvpjf backup.tar.bz2 --exclude=/proc ...
1
vote
1answer
56 views

How can I backup large amount of small files?

A Windows filesystem is mounted through samba and I am trying to compress a large amount of small files: find /path/to/files/ -newermt "2012-01-01 00:00:00" -path '*/*log.txt' -exec tar cvfz ...
1
vote
2answers
204 views

Issues while untaring in Linux- tarball created from Solaris

I am getting an error- Unknown file type 'A', extracted as normal file while un-tarring a set of files which has acl permissions set. I had created the tar file in solaris as tar -cpfv ...
1
vote
2answers
1k views

Is it possible to exclude empty directories when creating a tar?

I have a backup command which looks like this: tar cvpzf /backup/incremental-$now.tar.gz --after-date='1 day ago' -C / etc/ home/ root/ --exclude-from=/root/exclusion_list.txt ...
0
votes
2answers
112 views

Why does system lag or stall after successful completion of tar backup command?

I have a script that runs backup of system files via tar as a cronjob for my server. Every time the script is being fired off, it completed the task as successful. All backups were tested and appeared ...
1
vote
0answers
565 views

Backup archive format for delta syncing to Dropbox?

On an Amazon EC2 server with Linux AMI, I currently have a daily backup cron job be run: TMP_BACKUP_FILE="/tmp/backup.tar" BACKUP_FILE="/home/ec2-user/Dropbox/Backup/backup.tar" rm -f ...
2
votes
1answer
824 views

Filename encoding switched to UTF-8 by tar when untaring to Windows share

We have different Magento installations (webshop) that allows images to be added to a product freely. When an image is added to a product, the file is named in a specific way that sometimes ...
2
votes
1answer
492 views

Exclude mounted folders from tar archive

we want to backup our server and this seems to be pretty simple thing to do except one. Currently we use something like this: tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found ...
0
votes
1answer
6k views

Force tar to ignore/skip errors while compressing files?

Let's say I do this tar cfzp home.tar.gz /home (takes a while) and a file changes during compression and tar fails, I get "file changed as we read it" and tar stops. I assume home.tar.gz is now ...
1
vote
3answers
381 views

tar over ssh to IPv6 host

I want to tar to a remote host using the remote host's IPv6 address. I can ssh and scp to the host but GNU tar does not accept the IPv6 address. I tried: tar -cjvf ...
1
vote
2answers
103 views

How to maintain up-to-date snapshot tar archive efficiently?

I have a large directory of files and I would like to maintain a single compressed tar archive that I can server over http containing all the files which is brought up to date once each day. Many of ...
1
vote
2answers
6k views

Check integrity of .tar.gz backup

If you backup your system and create a .tar.gz with thousands of files and directories, how do you easily check its integrity? (ie without having to decompress). It's good to keep backups, but it's ...