2
votes
1answer
41 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
172 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
112 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
294 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
274 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
153 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
133 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
645 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
71 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
2k 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
266 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
2k 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
1k 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
90 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
81 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
88 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
4k 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
67 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
105 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
130 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
1k 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
3k 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
341 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
947 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
490 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 ...
5
votes
1answer
976 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
161 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
215 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
78 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
608 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
1k 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
316 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
98 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
973 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
1k 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
686 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
3k 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
130 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
2k 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 ...
2
votes
1answer
175 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
444 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
342 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 ...
0
votes
3answers
119 views

Uncompressing gzip file

I have compressed a folder using following command: tar czvf arch.tar.gz dirname/ When I try to uncompress it using following command tar xvfz arch.tar.gz then it uncompress folder but contents ...
11
votes
2answers
24k views

Can I extract a specific folder using tar to another folder?

I am new to the world of Linux and seem to have run into a stumbling block. I know I can extract a specifc archive using the command tar xvfz archivename.tar.gz sampledir/ however how can I extract ...
0
votes
1answer
174 views

Can I extract a file or directory using the tar command and provide it a specific name I want it extracted as? [duplicate]

Possible Duplicate: Can I extract a specific folder using tar to another folder? I am new to world of Linux and would like to know if I can extract a specific file or directory by giving it ...
1
vote
2answers
693 views

What happens if you use the command tar tvf as opposed to tar tvfz?

I am new to the world of Linux and in the process of setting up a Linux environment. I stumbled across the tar command as I need to view the contents of a file prior to extracting it and by accident ...
0
votes
1answer
237 views

Correct way of using the --remove-files option with TAR

What is the correct way to use the --remove-files option when using tar? Is it... tar -cfvj --remove-files archive.tar.bz2 archive/ Or... tar -cfvj archive.tar.bz2 archive/ --remove-files