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
6
votes
5 answers

Using Crontab to tar a directory at a regular interval

I want to tar a directory at a regular interval (say every morning at 4am) so I was planning on using crontab. How can I have the date be in the filename ie srcdirectorybackup5-30-09.tar so that I can differentiate between all of the tar files.
DHamrick
  • 825
  • 2
  • 9
  • 8
6
votes
3 answers

Returning A List Of Quoted Files Paths Using Find

I would like to create a tarball that contains files from a directory that have a ctime of less than 30 days. Most tutorials I have found have basically recommended doing something like this: tar cvf foo.tar $(find ~/POD -type f -ctime -30) The…
Tom Purl
  • 549
  • 1
  • 3
  • 13
6
votes
7 answers

running tar completely locks up mysql

I am having a seriously weird issue. If I tar some random directory with many files or a single large file tar -pcvf files.tar /var/log, mysql gets completely locked up and all mysql connections get used up for the time tar is running. My nginx…
Paxxil
  • 181
  • 1
  • 10
6
votes
4 answers

How do you only tar files in a directory based on a specific file name?

I want to create a tar ball and include only the files in the directory that start with a specific filename. For instance I have apples-x.x.x and oranges-x.x.x, and I only want to tar the files beginning with "apple". How can I do this? Thanks!
hsatterwhite
  • 332
  • 2
  • 5
  • 14
6
votes
5 answers

cpio VS tar and cp

I just learned that cpio has three modes: copy-out, copy-in and pass-through. I was wondering what are the advantages and disadvantages of cpio under copy-out and copy-in modes over tar. When is it better to use cpio and when to use tar? Similar…
Tim
  • 1,487
  • 6
  • 28
  • 43
5
votes
2 answers

Is it safe to zip/tar hotcopied svn repositories?

We want to store our backups of our svn repositories as a flat file. We'd like to tar/zip the whole hotcopied directory. I know that we could dump it to a flat file but let's pretend that we'd rather use hotcopy instead. Are there any gotchas (i.e.…
Son of the Wai-Pan
  • 757
  • 4
  • 11
  • 25
5
votes
7 answers

fastest backup for large files

what is the fastest way to duplicate a folder contain few files with few hundred megs size and other few megs small files? (say, /var/lib/mysql) cp or tar or rsync or...??
DennyHalim.com
  • 491
  • 3
  • 10
5
votes
2 answers

Exclude mounted folders from tar archive

we want to backup our server and this seems to be pretty simple thing to do except one. Currently we use something like this: tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/sys…
user2984570
  • 51
  • 1
  • 2
5
votes
3 answers

Linux tar archive without parent structure

I'm trying to modify a certain tar.gz archive I have. When I go to create the tar, it retains the parent directory structure, as a tarball should. However, is there a way to simply create a tar archive with just the files I specifiy, rather than the…
Blake
  • 77
  • 1
  • 7
5
votes
2 answers

CentOS 5.6 Update Version Of Tar

I am running CentOS 5.6 and for some ungodly reason, the version of tar is from 2004, and not compatible with the node package manager (NPM). How in the world can I update it? Is there an additional yum repository I can add, so I can simply execute…
Justin
  • 5,328
  • 19
  • 64
  • 84
5
votes
2 answers

tar incremental backup with --listed-incremental does not work for me (Linux, Ubuntu)

according to http://www.gnu.org/software/automake/manual/tar/Incremental-Dumps.html, i try to create incremental backups with tar and --listed-incremental on my Ubuntu, but the --listed-incremental part does not work for me. On day 0 I…
Rolf Wenger
  • 128
  • 1
  • 8
5
votes
4 answers

How to manually extract a backup set made by duplicity?

I have a set of files on my webserver produced by duplicity software: duplicity-full.20110315T085334Z.vol1.difftar.gz duplicity-full.20110315T085334Z.vol2.difftar.gz duplicity-full.20110315T085334Z.vol3.difftar.gz etc... (50 files, total size about…
Andrew
  • 321
  • 3
  • 5
  • 11
5
votes
2 answers

tar file modified bit (am I being BS'd to?)

I'm working on a project where I'll be using tar to incrementally backup data on a server to a number of tapes. According to a senior co-worker of mine, tar will "set special flags on files so that it can tell if the files has been modified since…
Russell C
  • 115
  • 1
  • 1
  • 8
5
votes
2 answers

tricks for speeding up tar while tarring up a huge directory of little files?

I'm trying to tar up a directory that has about 3M tiny files in it. Tar is chugging along, but I'm thinking its going to take longer than I can wait. I'm wondering if telling tar to not store metadata (owner, group, perms) would reduce the churn…
Trevor Harrison
  • 361
  • 3
  • 10
5
votes
5 answers

"Stream" tar action from remote server through Putty?

I am accessing a shared hosting account through Putty / SSH. The account is pretty full, 300 MB below its quota. I need to make a full backup of all data present on the account. Creating a bzip2 file using tar cjf archive.tar.bz2 directory/*…
Pekka
  • 2,178
  • 3
  • 20
  • 32