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

tar specific number of file

I have a directory with 27K files, I would like to tar them into multiple INDEPENDENT tar files, each will have 5000 files and the last one, will obviously have 2K (27K is not dividable by 5). What is the fastest/easiest way to do this?
soulSurfer2010
  • 307
  • 4
  • 10
4
votes
1 answer

Does tarring up small files into one big tar file before writing them to tape increase the level of data loss when an error occurs?

I've been looking at our backups recently and noticed that the tape throughput is a lot lower when writing lots of small files, so was thinking of tarring those small files up into one big tar file and the writing that to tape instead of the small…
David Gardner
  • 1,509
  • 2
  • 13
  • 25
4
votes
3 answers

Is there a quick way to get the very last file in a large TAR?

Let's assume I have a several gigabyte tar file, but I also happen to know that the very last file written to the archive is something important that I need. Since tar files are appended sequentially, is there a way I can make tar read into the…
andyortlieb
  • 1,092
  • 1
  • 12
  • 25
4
votes
3 answers

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 even better to actually make sure your backups…
user60129
4
votes
2 answers

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 correctness? tar -czpf - ./ --exclude mysql…
user12145
  • 1,115
  • 6
  • 28
  • 47
4
votes
2 answers

Can "tar" backup incrementally?

I have my home folder with a few GB. Is it possible to run tar on it, create a home.tar.gz, and then for changed files, it creates home1.tar.gz only with modified files from previous tar (thus being an incremental backup)? I would like to check the…
4
votes
4 answers

Corrupt tar (Resulting folder smaller than packed file)

I have an issue with a tarball created on a SuSe 10.3 Server version. The .tar file has a size of 6.5 GB but if I untar it under Ubuntu 9.10 the resulting folder only has a size of 1.5 GB. commands used: tar cvf for packing, tar xvf for…
Om3g4
4
votes
2 answers

Hash files in tar file

I have two *.tar files with similar contents. I want to verify which files are the same. A lot of the files are big so I comparing hashes would require extracting every file from each tar and computing the hash. Is there a way to hash files in a…
Stephen Rasku
  • 193
  • 2
  • 2
  • 9
3
votes
1 answer

Backup to remote server and create tar on the fly

I would like to backup a directory from my production server to a backup server using rsync. My current solution: tar directory on production server send to remote server via rsync My Problem with this solution: there is not enough space to create…
T K
  • 133
  • 1
  • 5
3
votes
1 answer

NFS - Very slow performance with small files (Also with CIFS)

I am having very bad performance with NFS between two debian stretch machines, and I can't find a solution. I am using rsync at the server side in the exports file and tcp,hard,intr,rsize=32768,wsize=32768 at the client side as options when…
LincolnP
  • 207
  • 2
  • 7
3
votes
2 answers

Extract duplicity difftar files manually

I have a duplicity backup which i am not able to recover with duplicity. By calling duplicity file:///path/to/backups /path/to/dir, it returns "Local and Remote metadata are syncronized, no sync needed." but the /path/to/dir is empty. I decrypted…
isnogud
3
votes
2 answers

Tar does not retain directory permissions

I am copying a directory structure of hundreds of millions of small images between two servers. The file structure, ownership and permissions needs to be retained during the copy. Our testing has shown that the fastest way to perform this copy is to…
Dan
  • 171
  • 2
  • 7
3
votes
3 answers

Why does "tar -cSf file.tar source" run out of memory?

I'm trying to back up 66 gigabytes to a NAS by making a tarball, but "tar -cSf ..." quits with a "memory exhausted" error after gigabyte 62. My Linux machine has a gigabyte of RAM and a gigabyte of swap space. (edit) I tried it again about where tar…
joeforker
  • 2,399
  • 4
  • 26
  • 35
3
votes
1 answer

Find files and tar.gz the resulting list

Executing the following command works as expected: find /path/to/logs/ \( -type f -name '*20161005.log' \) -print0 | tar -czvf /path/to/backups/backup_logs_20161005.tar.gz --null -T - But, trying to use this within a bash script, I get an empty…
Zuul
  • 263
  • 1
  • 2
  • 9
3
votes
2 answers

Is it safe to create tarball while files are in use?

Is it safe to create a tarball of a directory while the files in the directory are being used (read+write)? I want to create a backup of a 20GB directory without having to shut down my application server. I don't mind if the files are changed while…
Elite_Dragon1337
  • 216
  • 1
  • 2
  • 10