The tar archive format and/or the command-line utility for working with tar files.

learn more… | top users | synonyms

5
votes
1answer
261 views

How to display progress bar for tar incremental archives?

While creating a level-0 archive I can do this: tar -cf - . | pv -s $(du -sb . | awk '{print $1}') | gzip > out.tgz But in case of a level-1 (incremental) archive, I don't know beforehand what ...
4
votes
1answer
423 views

GNU `tar` runs `stat` on an excluded directory. Is it normal?

I'm running tar as root like this: cd / tar --create \ --verify \ --exclude-backups \ --exclude-caches \ --auto-compress ...
3
votes
1answer
96 views

Is it safe to use tar even if there are some characters other than ASCII in filenames and paths?

Is it safe to use tar even if there are some characters other than ASCII printable characters? For example, Japanese characters, Chinese characters, newline character etc. Are there any known ...
3
votes
1answer
314 views

Compose and pipe a gzipped tar archive in one go

I'm trying to come up with an effective way to create a gzipped archive of various system partitions on Android, piping everything out to stdout so as to be able to encrypt it as it comes across via ...
2
votes
1answer
28 views

How to decrypt a file from an encrypted tar archive without decrypting the entire archive

similar question: Encrypting and compressing I want to make a regular backup and store it as encrypted tar archive. That's achievable using tar and gpg. But for incremental backups this would require ...
2
votes
1answer
123 views

Remove tar compress spool from cron email

I have a crontab job that call a simple script to backup a website: 15 0 1,10,20 * * /home/username/bin/backup_whatever This is the script: #!/bin/bash TODAY=$(date +"%Y%m%d") FILE_TO_PUT="...
2
votes
1answer
54 views

Tar using progress bar and handling multi-volumes

I'm trying to create a tar of a large LVM volume onto multiple external drives. That part is solved. Now, because it is a LONG process, I'd like a progress bar. From the excellent articles here, I'...
2
votes
1answer
1k views

linux tar listed-incremental untrustworthy

I'm looking for some way to troubleshoot incremental backups with tar on linux. I've got huge datasets (about 3TB) that need backing up to tape. For this I use the linux tar command and mt / mtx on ...
1
vote
1answer
52 views

Restoring file system using tar causes login loop

Note: I am doing this to learn more about linux. I understand there are other tools that can be used with simple interfaces. Note: I am using Fedora 23. I have it installed physically on an SSD and ...
1
vote
1answer
277 views

How to convert tar.bz2 to .bz2?

I have a file with compression tar.bz2 , I would like to convert it to .bz2 . Is there a command that does this in one shot? I tried the below but no joy ! tar -xvjf US.tar.bz2 US bzip2: ...
1
vote
1answer
141 views

curl progress in dialog

how can i properly display the curl progress in the dialog window? curl http://mysite.corp/image/root_21.tar.bz2 | tar -C /mnt/dest/ -jxf - i tried this command but as you can see it does not ...
1
vote
1answer
149 views

Copy a rolling “last 2 months” of files

I have a friend who is a photographer and she has a lot of large files as a result. Our current solution is where some files are delivered to my house. I don't have the storage capability to store all ...
0
votes
1answer
42 views

Tar files in order

I am taring files using this script tar -cvf test.tar -C /home/user/Desktop/filestoTar File_one zap_file tar -rvf test.tar -C /home/user/Downloads/test Auto_file rocket_file And I want to untar ...
0
votes
1answer
40 views

How to recover a node/content from a tarfile that's been overwritten

Disclaimer: I'm not very good at writing questions, and mine is a very specific scenario. So I'm just going to jump straight into the situation: I was browsing my filesystem, and somehow managed to ...
0
votes
1answer
116 views

Encrypting existing tar.gz archive

I know of a method to encrypt a tar.gz archive while creating it (not sure if it's a recommend one): tar -czvf /path/to/save/archive.tar.gz -C /path/to/archive . | openssl des3 -salt -k #PASSWORD# | ...
0
votes
1answer
50 views

How to recover a .tar backup

I've a .tar backup, when I try to extract using below command. tar -xvf backup.tar Nothing is extracting and no errors or warning Seems like its corrupted. Is there any way to recover the .tar ...
0
votes
1answer
122 views

make `tar` archive from NTFS with non-ascii file names

Loaded a live disk into a Windows based machine with NTFS files. Being a Linux user for some years, using tar came to my mind instantly and made some backup archives from partitions and stored them ...
0
votes
1answer
31 views

Unable to extract to specific directory

I am trying to extract to file to specific directory but it doesn't produce result Operating system : SunOS Command: zcat /export/home/tceng/Desktop/temp/3.tar.Z | tar -xf - -C /export/home/tceng/...
0
votes
1answer
165 views

Using Xargs to write a tar archive in numerical order

I need to write an LTO of single frame files (DPX) in frame number order. When using the standard command below the frames are written out of order. tar -b 1024 -cvf /dev/nst0 <directory> ...
0
votes
1answer
66 views

How to create backup from symbolic links and from files, too?

I would like to archive some directories. These directories are contain some softlinks. I should keep these links and files, too. I didn't found any solution... I tried tar with -h option but it ...
0
votes
1answer
159 views

Backing up Linux server to Windows domain

I'm maintaining a small Linux workstation/server in a Windows-domain-based environment. Apart from being in the same network, the Linux computer is not connected to the domain. Until now, I'm using a ...
0
votes
1answer
465 views

How to add specific directory for a file during tar file generation?

When I create a .tar file using the tar command, what option do I need to use to add a specific directory hierarchy to the file? For example: Test_File.tar |__ MAIN |__ SUB1 ...
3
votes
0answers
42 views

Tar - Transform stdin without extracting

I am attempting to transform the paths of a tar file coming from standard input without having to extract the tar first. This is an apparent duplicate of this question, I am looking for a solution ...
3
votes
0answers
95 views

Is it possible to create an incremental snapshot file from an existing tar archive?

I have created a large tar archive and am now looking to do an incremental backup. The documentation indicates that a snapshot file can only be created when the initial tar backup file is created. ...
3
votes
0answers
2k views

tar: /dev/st0: Cannot write: Input/output error

When we attempt to use tar to write data to an LTO-5 tape, we get the following error. The device starts to write, and then fails. See the tar command and output, followed by the dmesg output. I ...
3
votes
0answers
354 views

debootstrap terminates partway through with “stdin: not in compressed format”

I'm on an Arch GNU/Linux system, fully up-to-date (both official repositories and from the AUR). I'm attempting to install a copy of Debian Wheezy so that I can chroot into it and work with the system....
2
votes
0answers
34 views

Make bootable disk from tar archive

I have a compressed tar archive from a SLES 11 root directory. I'd like to boot another machine with a live linux, extract my OS archive on a disk, and make the disk bootable. Is there any easy way to ...
2
votes
0answers
108 views

Backup using find and ssh to off-site server

I'm sure this has been been answered in bits and pieces on many sites, but somehow I can't seem to get this (as a whole) to work reliably. Scenario: I have a server that I would like to do ...
2
votes
0answers
177 views

Corrupt files after extracting with Cygwin's GNU tar

I have a bunch of tarball backups which I just restored onto my new Windows 8.1 + Cygwin system using GNU tar: zsh$ for file in **/*.tgz; do tar xvzf $file; done To my surprise a lot of these ...
2
votes
0answers
617 views

How to fix the corruption of the tar balls?

I was making a complete server backup and tried making the tar balls of each directory structure by using the following commands: nohup tar -cvf - /etc | gzip -9 -c > /opt/Backup_4_Jan/etc.tgz &...
1
vote
0answers
14 views

archivemount (tar) returns before writing complete (sync on write?)

I just learned about archivemount some days ago, and it sounds like exactly the solution I need for a backup problem I have with ecryptfs. However, in my tests, it seems that archivemount exits before ...
1
vote
0answers
28 views

Tar waiting a long time at end of block device

I had some trouble getting Linux installed to a particular netbook and had to restart it from scratch multiple times. Re-typing the same commands to set up networking and bootstrap the install was ...
1
vote
0answers
43 views

How to 'snapshot' a chroot?

I want to perform something similar to a 'clone' on vmware fusion/virtualbox/a VM manager. Host and chroot are both ubuntu. One complicating factor may be that this chroot may have one or more child ...
1
vote
0answers
56 views

Archive for root file system with quick random access

I need file archive format with the following features It is compressed (not plain tar or iso). It can backup (and restore) linux root file system keeping owners, symlinks, sparse files, devices, ...
1
vote
0answers
195 views

Using tar to backup and restore a path mounted with overlayfs

I have a system running OpenWRT with Linux 2.6.39.2. In my filesystem, I have symlinks contained in /etc/rc.d on ROM and more symlinks contained in /overlay/etc/rc.d in flash. overlayfs does a union ...
1
vote
0answers
161 views

untar error - Cannot change mode to rwxr-sr-x

I am trying to untar a .gz file , which is stored in the /root folder onto a directory in /mnt/flash2/example I use the following command - tar xzf filename.gz --no-same-owner -C /mnt/flash2/example ...
1
vote
0answers
65 views

tar --occurrence= option ignored?

Using GNU tar 1.26 on Linux, I'm looking for a way to stop processing after the N-th occurrence of a file in a .tar archive. This should work: tar --file=archive.tar --list --occurrence=1 filename ...
1
vote
0answers
427 views

Terminal freezes after using tar or gz

On Linux within bash the Pseudo Terminal window (terminator) as well as the Terminal itself "freezes" when trying to use autocomplete (TAB) as well as after getting an error message using gzip and tar....
1
vote
0answers
151 views

Disk partition emptied during tar backup

This morning I was doing a routine backup of my development drive, one of 4 primary partitions on my hard-drive. The script I ran was: filename="/home/Backups/Devi_"`eval date +%Y%m%d`".tgz" touch $...
1
vote
0answers
261 views

How to do incremental backup of .img files containing windows partition?

On an OVS I have a few windows machines. I want to create a full backup their .img disk files, thats done, .img.gz. Than I want to incrementally backup their C:/ partition, but thats not working. ...
0
votes
0answers
18 views

Unable to execute backup commands in a Virtual Tape Library

I have created a virtual tape library with mhVTL based on the steps given in this link. When i try to list the tapes with lsscsi -g that are mounted it showed. [0:0:0:0] disk ATA ...
0
votes
0answers
104 views

How to make tar to ignore last-modified-time of files/directories

I'm using tar to backup a directory. Some files/directories' last-modified-time will be updated but the content remains. I would like to get a tarball with the binary if the directory files' content ...
0
votes
0answers
41 views

Unix -untar files only looping one time - C-shell

I have list of *.tar.gz files that I want to unzip and untar at once. The code: foreach summ (`ls *.tar.gz`) gunzip -d < $summ | tar xf - end But only one file has been untarred. How would ...
0
votes
0answers
55 views

repack of fix tar file (containing files with similar name) with unexpected EOF

I have tar file, which is a backup from my Android 5.0 phone. The issue is that I get an unexpected EOF error. I wish to repack it. There are also several files with the same name (but different size ...
0
votes
0answers
166 views

I can fix/repair small damaged tar.gz files using fixgz but it doesn't work on bigger files

The title tells it. I have some damaged .tar.gz files, most of them are pretty small (smaller than 1-2gb) but 4 of them are bigger and fixgz cant fix them, when i run fixgz for those big files, it ...
0
votes
0answers
60 views

Backup server with tar, encrypt and directly transfer the result, AFTER BUFFERING IT

So I've been investigative how to make full backups with tar, and I found that tar is a good tool if the backup is to be made once, and if the server has enough disk space to handle the output file. ...
0
votes
0answers
120 views

shell script prompting for password but not taking it while doing tar

In my shell script, I have following lines: function tarIt() { FILE_OWNER=$1 TAR_FILE_NAME=$2 FILE_NAME=$3 su - $FILE_OWNER -c "tar -czf $TAR_FILE_NAME $FILE_NAME 2>&1" if [ ${?} -...
0
votes
0answers
2k views

Archive (Compress) giant folder in Linux using command line without termination

Well, I'm just trying to compress a whole directory (infact giant!) under Linux using a terminal. The entire folder size is about 7 GB. I've used below command to create the archive. tar -zcvf ...
0
votes
0answers
302 views

TAR not excluding directories with date pattern

I've written this small script: #!/bin/bash TODAY=`date --rfc-3339=date` CHECKDATE=`date --date "2 days ago" --rfc-3339=date` FILENAME=$TODAY-package.tar tar cvf $FILENAME --no-recursion --after-...
0
votes
0answers
298 views

Extract specific folder from a tar.gz

I know this question was previously asked on this site before like here 1 and here 2 but no success for me. I want to extract the Measures folder from my S012011_csv.tar.gz zipped file. If I do tar -...