Questions tagged [tar]

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.

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. The name “tar” originally came from the phrase “Tape ARchive”, but archives need not (and these days, typically do not) reside on tapes.

347 questions
0
votes
1 answer

Linux CLI Make a Tar.Gz with Tar.Gz First-level Directories

Currently, I use this command to make tar.gz archives: sudo tar -zcpvf archive.tar.gz directory1 directory2 directory3 Is there a way to compress multiple archives like above, but instead of compressing regular folders, have tar make sub tar.gz…
GTS Joe
  • 199
  • 2
  • 10
0
votes
3 answers

Running the tar command with the --exclude functionality does not work for directories

I use tar hczf t.tar.gz * --exclude="./test1" where test1 is the name of a directory that I want to prevent from being tarred. Unfortunately, tar still includes the directory test1. How can I have tar exclude directories?
Pota Onasys
  • 169
  • 1
  • 4
0
votes
1 answer

List files that will be overwritten by tar extraction

Say I have a tarball ~/foo.tar containing foo/ foo/bar.txt foo/baz.txt foo/qux/ foo/qux/corge.txt foo/qux/grauply.txt And in my home directory ~ I have an existing foo directory and the existing files foo ├── bar.txt ├── elvis.txt ├── presley │  …
David Moles
  • 444
  • 1
  • 4
  • 13
0
votes
1 answer

Exclude directory when creating tarball

I am trying to exclude a directory from getting tarballed. I have tried many combinations but the cache directory is still getting added. The directory I want to tarball is: /var/www/vhosts/latest/my.website/media/catalog/product The location of…
beingalex
  • 335
  • 3
  • 7
  • 13
0
votes
0 answers

Docker daemon can't import tar with duplicate files

I've been following this tutorial to create a docker image from a buildroot environment: https://blog.docker.com/2013/06/create-light-weight-docker-containers-buildroot/ Basically, the steps are: Create the rootfs.tar as you would any other x86_64…
0
votes
2 answers

Tar content without a specific directory

I have a magento installation I would like to tar. As some of you may now, in the root directory of a Magento installation is a directory called "media". This is the directory where all product images are stored. I want to tar the entire Magento…
0
votes
0 answers

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 development server, and from there run the deploy…
0
votes
1 answer

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 user@111.11.111.111 mysqldump -u user --password=test example |…
Adam
  • 349
  • 3
  • 13
0
votes
0 answers

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 directory is 652G and we are using LTO 4 tapes…
stead1984
  • 577
  • 8
  • 16
  • 32
0
votes
1 answer

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 the script looks like this: export TMPDIR=`mktemp…
Casey Jordan
  • 215
  • 4
  • 11
0
votes
1 answer

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 mysqldump --single-transaction -u $MUSER -h $MHOST -p$MPASS…
Joseph
  • 293
  • 2
  • 7
  • 14
0
votes
2 answers

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 again. Is there some parameter that allows my tar…
amandanovaes
  • 143
  • 1
  • 5
0
votes
1 answer

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, then write that to tape: tar c /etc | openssl…
fukawi2
  • 5,396
  • 3
  • 32
  • 51
0
votes
1 answer

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 --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt…
Yusuf Ali
  • 7
  • 2
0
votes
2 answers

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 to be working and not corrupted. But, my system…
Faron
  • 107
  • 6