Sponsored Content
Full Discussion: File Backup - TAR help
Top Forums Shell Programming and Scripting File Backup - TAR help Post 302446979 by thegeek on Friday 20th of August 2010 10:30:12 AM
Old 08-20-2010
If you are trying to create separate tar files then try the following,

Code:
find ./t/* -mmin -10 -exec tar zcvf {}.tgz {} \;

first argument to find is path, you dont have to give * anyway.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

tar backup

Hi all, I would like to append list of files to already taken tar backup file. can anybody help? last month backup : cd /accounts/11 tar -cvf monthback.tar * Now I want to add /accounts/12 to monthback.tar is it possible? Krishna (1 Reply)
Discussion started by: krishna
1 Replies

2. Filesystems, Disks and Memory

Using `tar` for a selective backup.

Hi all & anyone. I'm trying to selectively backup up some old Apache log files before they are removed from the system (Slackware box). Have created a file listing of what I want backed up ...Below is a portion of the file ./selectedbkup... (2 Replies)
Discussion started by: Cameron
2 Replies

3. UNIX for Dummies Questions & Answers

tar backup problems

Im trying to use tar to backup the os directories. I have a file called bdirs which contains a list of the directories that im trying to backup: /bin /dev /devices /etc /export /home /kernel /lib /local /mnt /opt /platform /proc /sbin start /usr /var /vol (3 Replies)
Discussion started by: blakmk
3 Replies

4. Shell Programming and Scripting

How to exclude file in tar backup?

I am taking a backup of area with the following command:- tar -cf -./* |/usr/contrin/bin/gzip >xxx.tar.gz. The area contains following files :- xxxx yyyy zzzzz asdaD DASdD WQWEE I want to backup all the files except yyyy from the following area. I checked manual page of tar but I... (2 Replies)
Discussion started by: kamlesh_p
2 Replies

5. UNIX for Dummies Questions & Answers

Tar backup

I am trying to do a full system backup using tar. It then after maybe 12 or so hours comes up with tar: write error: unexpected EOF. I have thoroughly cleaned the drive and tried to use a different drive but it still gives me this error. Can someone help. I am on solaris 8. (1 Reply)
Discussion started by: TMashie
1 Replies

6. Filesystems, Disks and Memory

Tar file from Linux server to PC for backup

I have a Linux email server, I want to backup all /home /var... by tar command and copy to my PC for backup everyweek. The Linux serve rhave ftp function. Is there any program to help backup my file? any url welcome many thank. (8 Replies)
Discussion started by: zp523444
8 Replies

7. UNIX for Dummies Questions & Answers

Backup with tar

Hi friends, I am planning to backup my Solaris Servers to SAN storage using tar. Also palnning to automate the job using Crontab. Can anyone advise how to make the date change automatically everyday for backup. Pls correct me if I am wrong. Thanks (7 Replies)
Discussion started by: solaris5.10
7 Replies

8. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

9. AIX

how to take tar backup of the contents of a file

Hi I have a file named files.2.backup which holds the location of some directory and file i,e $ cat files.2.backup /d01/app/oracle/product/7.3.2/dbs/fortest_syst_01.dbf /d01/app/oracle/product/7.3.2/dbs/fortest_temp_01.dbf /d01/app/oracle/product/7.3.2/dbs/fortestdata_01.dbf... (5 Replies)
Discussion started by: sumanbangladesh
5 Replies

10. UNIX for Dummies Questions & Answers

UNIX Tar file backup

I want to create a tar file that backup all my recent work. I have no idea how Tar file works and I am new to Unix Please help (1 Reply)
Discussion started by: GGBEASTBOI
1 Replies
tar_extract_all(3)						  C Library Calls						tar_extract_all(3)

NAME
tar_extract_all, tar_extract_glob, tar_append_tree - high-level tar archive manipulation functions SYNOPSIS
#include <libtar.h> int tar_extract_all(TAR *t, char *prefix); int tar_extract_glob(TAR *t, char *globname, char *prefix); int tar_append_tree(TAR *t, char *realdir, char *savedir); VERSION
This man page documents version 1.2 of libtar. DESCRIPTION
The tar_extract_all() function extracts all files from the tar archive associated with the TAR handle t into the path named by the prefix argument. The tar_extract_glob() function extracts all files matching the given glob pattern from the tar archive associated with the TAR handle t into the path named by the prefix argument. The tar_append_tree() function appends all files from the directory tree named by realdir to the tar archive associated with the TAR handle t. The pathnames stored in the tar archive are modified by replacing realdir with savedir, so that the files will be extracted into savedir. RETURN VALUES
On successful completion, these functions will return 0. On failure, they will return -1 and set errno to an appropriate value. ERRORS
These functions will fail under the same conditions that the tar_skip_regfile(), tar_extract_regfile(), opendir(), lstat(), or tar_append_file() functions fail. SEE ALSO
opendir(2), lstat(2), tar_skip_regfile(3), tar_extract_regfile(3), tar_append_file(3) University of Illinois Jan 2001 tar_extract_all(3)
All times are GMT -4. The time now is 11:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy