3
votes
1answer
27 views

In tar how can I exclude dir contents but leave empty dir

I want to create a tar file excluding certains folders who have many sub-folders and files, but leaving only the main folders that's being excluded. Explaining: -project |-dir1 |-dir2 |-cache ...
3
votes
2answers
80 views

BackupPC Taking over 72 hours to backup 250GB's

I am using BackupPC to backup some workstations at the office. One workstations in particular has a sizable amount of data when compared to the rest, however, it's not that large in general (talking ...
-2
votes
2answers
33 views

Deleting file in tar mounted with archivemount?

archivemount allows rw-mounting tar archives. What happens when I delete a file? Is it actually removed from the tar archive? Is a delete flag set? If the file is actually removed, then I assume the ...
1
vote
4answers
101 views

How to restore a backup from a tgz file in linux

How can i restore from a backup.tgz file generated from another linux server on my own server? I tried the command the following command: tar xvpfz backup.tgz -C / The above command worked, but it ...
-2
votes
1answer
99 views

Resume a tar command that was stopped

I am trying to tar a huge directory (with about 600GB) and sometimes my SSH conection drops and I need to execute the tar code again and my linux overwites the previous file beginning all the tar ...
2
votes
1answer
105 views

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 ...
0
votes
1answer
270 views

How do I backup 50GB+ of files on a linux box to a remote sftp account [closed]

How do I backup 50GB+ of files on a linux box to a remote sftp account. My requirements Store several versions of the backups. Encrypted before sent to remote server. Disk and bandwidth efficent, ...
0
votes
1answer
197 views

untar all files in specific directory but not the directory

I think this may be a simple question but cannot find the answer. I am trying to extract some files from a tar file. These files are in a directory within the tar file. I tried the following however ...
0
votes
2answers
870 views

Getting errors while making backup of whole centos with tar

I am trying this command tar cvpzf /TEMP_BACKUPS/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/tmp --exclude=/TEMP_BACKUPS --exclude=/mnt --exclude=/sys / > /TEMP_BACKUPS/mylog.txt ...
0
votes
2answers
359 views

UNIX ctime : how to keep this precious information in backups (tar)?

I have three questions related to the "ctime" information of a file. They are in bold (if you don't have time you can jump directly to them). A website on my dedicated server has been hacked. Lots ...
-1
votes
1answer
284 views

tar operation taking extremely long time

Wonder if anyone can help with this issue, we running RHL 5 on HP Proliant DL580 G7 it has 2xCPU @1.87GHz 6XCORES each & 64GB RAM. lately backing up a directory (62GB) with tar (tar -czvf ...
3
votes
1answer
190 views

Can I get tar to not use the filesystem cache when reading files?

We have a cronned job on a production web server that requires tarring up files from across the filesystem. It runs for about 105 minutes, and during that time, Apache starts swapping because all ...
0
votes
1answer
1k views

Creating tar from the files within the specific date range

I'm having trouble with getting my data from my shared hosting. I've approximately 20 GB folder that contains about 40.000 images. I tried archive that folder by splitting archive files: tar -cvpj ...
0
votes
1answer
120 views

find and delete files of a certain type inside a tar.gz file

Is there a way to not only find but also delete any .gz files inside a .tar.gz file? I found this link but I wouldn't know how to modify it to make it able to delete found files.
2
votes
3answers
4k views

Linux backup using tar

Im new to linux backup. Im thinking of full system backup of my linux server using tar. I came up with the following code: tar -zcvpf /archive/fullbackup.tar.gz --exclude=/archive --exclude=/mnt ...
2
votes
2answers
352 views

Deduplication of tar archives

Now I'm trying to configure ZFS with deduplication on my linux backup server and have a question. For example I have 1k files in backup1.tar and 1k same files and 1 new in backup2.tar. This files ...
32
votes
1answer
3k views

Why does `tar -xvfz` fail, but `tar xvfz` work?

tar -xvfz foo.tar.gz returns an error tar: z: Cannot open: No such file or directory This is completely understandable - the f switch expects a filename, and so needs to be last. However, omitting ...
-3
votes
3answers
2k views

How to find files of certain extension and tar each of them in to another location

I have script for finding files of certain type and compress them to a single tar archive and put in to other place. But now, there is a change in requirement, that I need to find files of certain ...
1
vote
1answer
100 views

Linux: Gnu-Tar Excludes

I'm trying to perform a full backup of a Linux server using GNU-Tar. The file system looks like this: ├── backup ├── data │   ├── d1 │   ├── d2 │   └── tmp │   ├── tt1 │   ├── tt2 │   └── ...
-1
votes
3answers
85 views

How to tar folders with specific letter

I have a long list of folders. i want tar only folder which starts with "a". How can i do that? Actually, I am having photo gallery website, which has 1000s of folders. I wish to move another server ...
0
votes
2answers
106 views

moving files and directories between two machine, via a third, preserving permissions and usernames

The situation is as follows: Machine A has a file repository accessible via rsync Machine B needs the above mentioned files with all permissions and ownerships intact (including groups etc) ...
9
votes
4answers
5k views

Does tar preserve permissions if user IDs change?

I need to backup some data with the "p" option on tar command. The problem is the place I'm going to restore this data will have all the same users, but those users may have different IDs. Does that ...
1
vote
1answer
69 views

tar + tar not open all files

When I want to view the following tar file , then tar show the following three files from /var/tmp tar tvf fix.tar install.sh /usr/cti/apps/swp/dir/script1.sh ...
1
vote
2answers
123 views

Issues while untaring in Linux- tarball created from Solaris

I am getting an error- Unknown file type 'A', extracted as normal file while un-tarring a set of files which has acl permissions set. I had created the tar file in solaris as tar -cpfv ...
0
votes
1answer
35 views

Installing multiple mysql as rpm vs tarball

Which is the suitable way to install multiple mysql servers without affecting the current installation in fedora( rpm or tarball)?
0
votes
4answers
160 views

Tar dereference only 1 level

I use the following pseudo-script to create a TAR of my installed software mkdir tmp ln -s /path/to/app1/bin tmp/app1 ln -s /and/path/going/to/the-app-2 tmp/app2 tar -c --dereference ...
2
votes
1answer
2k views

Absolute recursive tar without parent directories?

I have a directory structure that looks something like this: /var/www/website/index.php /var/www/website/home.php /var/www/website/whatever.text /var/www/website/.htaccess /var/www/website/images/ ...
5
votes
3answers
4k views

Determine if file is in the process of being written upon?

I need to deploy an automated process (via 1 min cron script) that looks for tar files in a specific directory. If a tar file is found, it is untarred to the appropriate location and then the tar file ...
1
vote
3answers
357 views

tar over ssh to IPv6 host

I want to tar to a remote host using the remote host's IPv6 address. I can ssh and scp to the host but GNU tar does not accept the IPv6 address. I tried: tar -cjvf ...
1
vote
1answer
1k views

linux/solaris when to use tar or gtar

is it possible to know when need to use tar or gtar according to tar file for example I have some tar file as sometarfile.tar how to know if need to use tar or gtar command ? is it possible ...
5
votes
3answers
684 views

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 ...
2
votes
1answer
2k views

tar Exiting with failure…?

i'm untaring with this command tar -pxvzf filename.tar.gz an everything seems to be going fine but, it unexpectedly exits with the error below. Is there a reason why I'm receive this error and / or ...
6
votes
1answer
1k views

tar padding with zeros

When performing a tar on a bz2 compressed file I am encountering the following error, tar: dump.sql: File shrank by 19573448400 bytes; padding with zeros Can anyone point what might be causing this ...
0
votes
1answer
184 views

tar from tape never finds directory I want

I'm a newbie when it comes to working with tape backups. I'm trying to extract a directory from a tape archive, and not getting much success. The directory on the tape is of the format ...
1
vote
1answer
253 views

Make rsync working with compressed target or tar creating no increment files

I need to make a backup on my external hard drive. I looked both at rsync and incremental tar. The problem is that I want my backup to be compressed. With rsync I can only compress the data transfer, ...
2
votes
1answer
81 views

Linux - Splitting a backup into two steps

I create a tarball using tar zcf arhive.tar.gz dir/ and this works ok. Now I wanted to split this into two simple archives, one only for images, the other -- for everything else. It seems that ...
1
vote
1answer
709 views

Install Old Version of PHP on Centos 6

I am trying to install php 5.2.17 on a CentoOS machine. Having problems as I have only used yum in the past. I have the file downloaded and unpacked...not clear on how I need to ./configure before ...
4
votes
2answers
2k views

Compress every file in a directory into its own compressed file

How do I compress every file in a directory into its own tar whilst preserving the name for each file? i.e. file1.out file2.out --> file1.out.tar.gz file2.out.tar.gz
3
votes
2answers
373 views

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 ...
0
votes
1answer
111 views

Use tar to exclude one directory (but not another) that matches a pattern

I'm working on doing a pretty straightforward tar for a site, but there's a wrinkle. Here's the file structure of the site: ... files/ images/ images/visitors/ ... logs/ ... ...
2
votes
4answers
1k views

Linux - Bare Metal Restore from a Tar file

I make a backup of my Debian webserver on a daily basis. A full backup on Sunday, and differentials each other day of the week. The backup is made with Tar. I backup the whole system into the Tar ...
2
votes
2answers
2k views

tar - Remove leading directory components on extraction

How can you extract only the target dir and not the complete dir tree? compress tar cf /var/www/site.tar /var/www_bak/site extract tar xf /var/www/site.tar -C /tmp This will produce: ...
2
votes
3answers
804 views

encrypt tape files with openssl and tar

I am trying to add encryption to my current tape backup scripts by piping the output through openssl, at the moment I have : tar -czpvf /dev/nst0 /home /otherdir so adding openssl gives this : tar ...
1
vote
2answers
4k views

How to exclude files from TAR archive using regular expressions?

I have a simple question, yet I can't find or solve the answer. I want to make a tar archive, but I want to exclude some files from it using regular expression. Example of the file to exclude is ...
3
votes
1answer
134 views

verify integrity of encrypted tar

I'm using tar along with openssl to create encrypted tar archives of some large directories (about 30GB). What is the possibility of corruption in this process, and how would I verify that the ...
4
votes
3answers
3k views

How to convert a TAR file into an ISO file

I have a Linux TAR file that I would like to convert directly into an ISO. Is there a way to do this, preferably, without having to extract the contents of the file first? This would be similar to ...
1
vote
1answer
39 views

Tar: create new archive from filtered archive

I need to create a new tar archive from the filtered output of the original. I thought something like this might work: tar xvpf myarchive.tar --exclude=foo* | tar cvpf mynewarchive.tar but that ...
3
votes
1answer
191 views

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 ...
2
votes
1answer
527 views

How can you designate an arbitrary leading path when adding files to a tar?

Is it possible to set an arbitrary path within a tar archive to place files which may not exist on your original filesystem? This differs from the -C switch in that I may want to take a back up of ...
0
votes
2answers
368 views

CRC Failed, File is broken, using php system command to tar a directory

Can anybody see a problem with the below PHP code? Or have any ideas to troubleshoot a solution as to why whenever I download the backup file.tar.gz and try to open it using 7zip on windows... that I ...