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

tar -xvf error "Can't restore time" when trying to extract in certain directories on mac osx but works in others

Strangest thing. I downloaded the openjdk release here: https://jdk.java.net/16/ When running tar -xvf on the file in the ~/Downloads directory it works fine. But when running in /tmp or another directory I have in my home folder I get the error:…
1
vote
3 answers

bash one-liner loop over directories throws errors

I'm trying to build a bash one-liner to loop over the directories within the current directory and tar the content into unique tars, using the directory name as the tar file name. I've got the basics working (finding the directory names, and…
cori
  • 381
  • 1
  • 8
  • 16
1
vote
1 answer

Validate tar extraction

I have a script that processes large tar.bz2 and tar.gz files. So the user doesn't think it has locked up they are piped in from pv: pv redacted.tar.bz2 | tar -xj pv redacted2.tar.gz | tar -xz Problem is these files are large and takes time. If a…
graham.reeds
  • 181
  • 4
1
vote
2 answers

Creating backups with tar.gz and rsync

I'm trying to use this bash script to create and send the tar.gz file to my backup server, some reason it doesn't seem to copy it, is there a better solution to what I'm trying to do? I'd rather have it compressed before I send it over the…
Killbots2012
  • 13
  • 1
  • 1
  • 3
1
vote
2 answers

How can I transfer a dedicated bare metal server into a VM?

I have the following problem: We have a dedicated (bare metal) hardware server (Debian 10) on which we have no direct physical access. Now I want to transfer all data and applications that are on this server to a VM and run it on a KVM host. Why do…
manifestor
  • 6,079
  • 7
  • 27
  • 39
1
vote
1 answer

How to owerwrite directory with tar?

I want to extract files with tar so that the whole directory will be owerwritten. I added --overwrite-dir but still old files in test dir remains. For the test, I have /home/ubuntu/f1/test/first.log and /home/ubuntu/f2/test/second.log Then I run in…
ogbofjnr
  • 173
  • 1
  • 10
1
vote
1 answer

How to take backups resilient to data corruption , fast and reliable on Linux?

I need a resilient backup solution. I was using tar with pigz, however I am afraid of tar.gz corruption and losing data. Projects are between 4TB - 25TB of data for each project folder. We are talking about a total of 240TB to 400TB data with…
Gediz GÜRSU
  • 536
  • 4
  • 12
1
vote
2 answers

exclude directory with tar command

T would like to use the tar command in Linux to back up some files, but i would like to exclude a specific directory from the archive. How can I do that?
haim evgi
  • 753
  • 1
  • 10
  • 15
0
votes
0 answers

tar | pigz dies if run under cron

I run a kind of backup script using tar joint with pigz for compression. The problem is that tar -zcf /file.tar.gz /folder runs under cron. While tar -I pigz -cvf /file.tar.gz /folder nor tar cvf - /folder | pigz > /file.tar.gz do not... It…
Paul Paku
  • 151
  • 9
0
votes
1 answer

How to exclude a folder by name recursively when making a tar archive?

I know it is possible to exclude a particular folder by a command like this: tar --exclude='/srv/www/project/node_modules' -zcvf /backup/project.tgz . My question how to exclude all folders named node_modules within the entire /srv/www?
W.M.
  • 204
  • 1
  • 2
  • 8
0
votes
1 answer

Command/script to extract "sub-tarball" from tarball

I am aware of that I can extract single/multiple files from a tar archive, but is there a command that I can easily pass to immediately create a "sub-tarball" from an existing tar archive? This is because some tarballs are too large do this Extract…
user121392
  • 13
  • 1
  • 6
0
votes
2 answers

How to untar a very large file with missing space

I have reinstalled my server and before that i did a backed up. My backup is a tar file without special compress option (meaning that the size of the tar file is approximately the same than the size of the info backed up) and after that, the tar…
0
votes
1 answer

abnormal very high CPU during lengthy write operations

I have a set of large files which I sometimes copy back and forth between a Linux box and a Windows box. The files are each about 2 GB, and there tend to be 10 or so of them (they're a VM image). The VM runs on Linux (qemu) and I back it up to a…
William
  • 137
  • 6
0
votes
2 answers

Backup: How to place output of 'split' on external drive?

I am trying to back up ("copy") my home directory to an external hard drive so that I can send the computer in for repairs. Naturally, the family external HD is FAT32, which means I have a max filesize of 2G. I have a few files which are greater…
rascher
  • 1,118
  • 3
  • 13
  • 14
0
votes
1 answer

Uploading files using tar

Can you help me? I have this piece of code that I'm using on my Ubuntu 16.04 server tar -c /var/www/dxa/backup.zip | ssh -p 8000 'tar -xvf - -C /' But everytime I run this command, the terminal ask me user and password. I want make…
mitrik
  • 23
  • 5