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
0 answers

How to force tar to include certain directories when using --exclude option

I need to backup a hierarchy. I need to keep the image as small and fast as possible. I use tar -c --exclude="..." with several --exclude=".." patterns to omit quite a few directory/file patterns, and that works fine. However, the hierarchy has…
JonBrave
  • 101
  • 1
0
votes
1 answer

Extract specific file from tar.gz file?

I am trying to extract a specific file from a tar.gz file. This is the code I used: tar -zxvf Laura.tar.gz Laura/2021-10-22_16.52.10_pWOX5-YFP_x_membraneRed_Movie1/DC_CROPPED_h5/DC_CROPPED.h5 Laura.tar.gz is my tar.gz and DC_CROPPED.h5 is the file…
0
votes
1 answer

How to compress a directory, using tar, and then delete the directory it compressed?

On my server there is an application directory that I need to make a full copy of it but the copy takes up a lot of space, I need to compress it and then remove it. I already use the command tar -czf bkp-mydir-$date.tar.gz mydir/ But I need it to…
0
votes
3 answers

Tar backup command for exclude backup files & cache & include only httpdocs subdirectories

I am looking for a tar command that meets the following requirements: I want to exclude all files ending with: backwpup & .zip (in between and before can be any e.g. uploads/123backwpup-123.zip) I want to exclude all folders in the area…
Mike
  • 103
  • 1
  • 5
0
votes
1 answer

Debian: Simple way to compress files wanted

I often need to compress archives in Linux. is there a simpler way instead of always building such complicated commands? tar zcvf /tmp/mybackup.tar.gz /home/important
Gill-Bates
  • 585
  • 2
  • 8
  • 23
0
votes
0 answers

is there a faster way to extract a large file tar in lz4 format?

I have a 7 TB file that is tared with lz4 compression. It takes about 8 hours to extract. is there a faster way to do this? This is the command I use: lz4 -d /mnt/tmp/7TBFile.lz4 | tar -xvf -
0
votes
3 answers

Magnetic tape alternative

I have recently been assigned as a systems administrator to look after a streaming service and its related server architecture. Once a week i travel 3hours to turn around a magnetic tape library which holds server files. To save on driving, I want…
0
votes
1 answer

Tar and 7z compression on Linux - what's the difference?

I have a problem! I have a backup script in python. It backups all the folders in /var/www/ into different .tar.7z for each folder inside /var/www/ The problem is that the compression time is very slow. And for 4GB big folders it stops compressing…
Pikk
  • 339
  • 1
  • 6
  • 19
0
votes
2 answers

Can we use make tar multi-threaded without any sort of compression

I have to backup 500GB using the traditional tar -cvf command (without any compressions) However tar is adding each file one by one and this way it's taking a very long time Is there any way to make tar multi threaded (like it can add multiple files…
Mario
  • 148
  • 7
0
votes
1 answer

Execute following steps after rsync is finished

First I thought that rsync isn't syncing everything described here Limitations of rsync? Not syncing everything Now after a day I found out that it was actually still working/ running and now all the files are there. The problem is: My zip is…
jona
  • 113
  • 5
0
votes
1 answer

Renaming a tar file in unix script

cd /var/opt/sw/e4/data/dev/e4_dev/DEVL3/EW/EWD1/DATA/AED/INPUT for file in *;do tar -czf ../OUTPUT/"${file}".tar; done According to the above code the files in input path eg. aedlog, aaalog... (file name) are placed in the output path as…
0
votes
0 answers

Diff a tarball on stdin against a directory hierarchy?

I have a multi-terabyte filesystem I want to diff against a multi-terabyte tar file. The tar file is only available from stdin - no seeking allowed. I do not have the disk space to write the tar on stdin to disk. GNU "tar --diff" is almost what I…
user1084684
  • 155
  • 1
  • 7
0
votes
2 answers

RHEL 7 security patch installation from tar

Novice Linux guy here I have a huge (5G) linux-security-patches tar. Upon extracting, I see its got loads of rpms. What is the most efficient way to install them all ? Also, is it same as installing each rpm individually ?
0
votes
1 answer

Tar directory is new error

I am trying to make a backup of two directories, /etc/httpd and /etc/letsencrypt I am using the command tar Pcfvg httpd_backup.tar /etc/httpd/ /etc/letsencrypt/ >/dev/null The redirect to /dev/null at the end was only added for debugging…
user324747
  • 195
  • 1
  • 1
  • 7
0
votes
1 answer

Does tar create point-in-time snapshots?

I know that tar can be used to create a backup. However I wonder if the operation creates point-in-time backups or not. Basically I wonder if it grants consistency if the directory and files are being added / modified / deleted in the meantime.
collimarco
  • 264
  • 2
  • 3
  • 10