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
3
votes
2 answers

Tar exclude not working?

tar -cvf file.tar --exclude=thumbs/ \ --exclude=uploads_event/ \ --exclude=uploads_forum/ \ --exclude=uploads_admin/ \ --exclude=uploads_userpoints/ \ …
Andrew Fashion
  • 1,655
  • 7
  • 22
  • 26
3
votes
2 answers

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 -tzf backup_2010-09-27.tar.gz | grep…
Daniele
3
votes
1 answer

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 process? I ssh'd into my linux (ubuntu)…
Louis
  • 155
  • 1
  • 6
3
votes
1 answer

Tar extracting from multi-volume tape whilst computing shasums

As part of our backup system, we replicate zfs datasets from a TrueNAS system to a couple of backup servers, one of which is running TrueNAS Scale and has a LTO-5 tape drive connected. We occasionally write one of the read-only snapshot's contents…
Gary
  • 41
  • 3
3
votes
1 answer

How do untar as the current user by default?

I have a batch of CentOS EC2 instances, which have an additional user added to them via ansible. Normally when unpacking a tarball, the owner is centos.centos (default login for EC2 Centos). When an additional user is created (via ansible or…
SB.
  • 31
  • 1
  • 3
2
votes
1 answer

Best strategy for daily back up of terabytes of data with millions of files

Currently I create an NFS and mount it on a special server that does the actual backups and uploads it to s3. My main concern is I feel like overcomplicated this simple task. I schedule cron job to run the backup off hours but still would like to…
alexfvolk
  • 164
  • 2
  • 10
2
votes
2 answers

Extracting single file from large tar.gz file

I have an incredibly large tarball. I'd extract several files out of many thousands within the archive. I'm on CentOS 6.10 running GPFS 4.2.3. I've seen from this answer that pigz is useful in extracting the entire tar.ball. Extracting the entire…
2
votes
1 answer

how do I extract a tar archive with larger block size?

I have a tar ball that has a huge number of very large files. The blocking factor is 10k. This is taking too long to extract because it does a lot of 10k writes. The filesystem will perform better if I get larger writes in one shot. If tar cannot…
steve landiss
  • 399
  • 1
  • 3
  • 8
2
votes
0 answers

TAR command exit status non 0, with the option ignore command error

I'm trying to make a tar of a logs directory, the applications are running so the logs keep changing, clearly when i run the tar command it give me the warning: "file changed as we read it", and give an exit status of 1, the problem is that the…
Emax
  • 415
  • 1
  • 4
  • 8
2
votes
1 answer

"Cannot close: Input/output error" when extracting tar on NFSv4 share

I have been trying to get to the bottom of a strange errors when extracting tar archives on an NFS share. The errors manifest themselves when extracting a tar files which include files which have been archived without write permissions set on the…
PicoutputCls
  • 253
  • 4
  • 15
2
votes
1 answer

tar --listed-incremental includes all directories in each increment?

Given a tree structure with files in it, say: source |-- bar | +-- three.txt |-- baz | +-- four.txt +-- foo |-- one.txt +-- two.txt If I do tar czvf dest/archive-1.tgz --listed-incremental dest/archive.snar source/* That creates a .tgz…
2
votes
1 answer

How can I check if a directory contains the same files of a TAR archive?

Let's say I have a folder Documents and a TAR file Documents.tar, how to check if the tar file contains the same files that are present in the directory? The more obvious solution to me would be to do: $ tar xvf Documents.tar -C untarDocs $ diff -r…
marcanuy
  • 268
  • 1
  • 4
  • 11
2
votes
1 answer

Archiving bunch of files in the fastest possible way

I'm implementing a torrent downloading and archiving system. I want to download a torrent file (which contain several small files) and then archive it. My Disk performance is poor. so i want an efficient way of archiving files. I have several…
Pedram A
  • 21
  • 1
2
votes
1 answer

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 to avoid having to create the archive and then…
MultiformeIngegno
  • 1,687
  • 9
  • 26
  • 31
2
votes
4 answers

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 replaced the existing system files which made my…
Antonio Alimba
  • 23
  • 1
  • 1
  • 3