04-25-2003
Hi oombera,
What Perderabo wrote sounds good, but really doesn't work for me, I just tried it again, the temp-directories still are in the archive. Also the way you described didn't work for me. Then the temp-directories are again in my archive.
But I've got a way that does work for me, it is not ideal, but it is working. It is the following:
tar -cvf /tmp/datadir.tar --exclude=temp1 --exclude=temp2 --exclude=temp3 /appl/data
You were also wondering why I am concerned with this. Well that is because of my daily backup of the whole system. Every day I want to make a backup on tape of the whole system, but not of the temp-directories. While the backup is being made other proces can be running changing files in the tempdirectories. Files in these directories change while in the meantime backup is trying to write them to tape, because of this the backup can crash. So that is the reason. Hope you understand me.
Anyway I am very thankful for all your help.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Howdy
I have this directory structure ...
eep
eepaptest
eepfatest
eepgltest
eep.old
eeppoptest
ehf
ehfaptest
ehfgltest
ehp
ehpgltest
I want to find files in these directories, but I want to exclude eep, ehf & ehp.
Cany anyone help with the correct command ?? (1 Reply)
Discussion started by: SmurfGGM
1 Replies
2. Shell Programming and Scripting
Hello,
I have a line in my script to find the files changed in the last 24 hours. It is as below:
find /home/hary -type f -mtime -1
I now want to exclude a directory named "/home/hary/temp/cache" from the above find command. How do I add it to my script?
Any help is appreciated.
... (9 Replies)
Discussion started by: tadi18
9 Replies
3. UNIX for Dummies Questions & Answers
Hi,
Can some one help me how to exclude multiple directories using find command..
I have the directory structure below.
/a/a1/b1
/a/c1/c2
/a/d1/d2/d3
I want to exlcude a1,c2and d3 from the above using find,can some one suggest pls..
thanks in advance...
Use code tags... (1 Reply)
Discussion started by: jagadish_gaddam
1 Replies
4. Shell Programming and Scripting
Hi Forum.
I'm trying to write a script that finds and deletes files that are older than 300 days. The script will read a table that contains the following 3 columns:
1st col: “Y” means sub-directory scan; "N" means no subdirectory scan
2nd col: sub-directory location
3rd col: File prefix... (7 Replies)
Discussion started by: pchang
7 Replies
5. Shell Programming and Scripting
Hi.,
I have a script, in which I am processing a files present in the directory types.
ls -lrt | grep ^d | grep Dir_type | awk -f '{print $9}' |\
while read dir_name; do
#operations
done
where Dir_type is the pattern in which directories get created. How to filter out empty... (2 Replies)
Discussion started by: IND123
2 Replies
6. Shell Programming and Scripting
Hi,
I use find command to list all the files in a directory and its sub-directories, but the problem is to exclude certain directories during search. Can i give the directory names in command line to skip them and search rest of the directories?
For example i have directories:
test
../test1... (1 Reply)
Discussion started by: nmattam
1 Replies
7. Shell Programming and Scripting
All,
I am trying delete folder by adding pattern not to delete certain folders. But i struck with error.
When i use below command from command line, it works fine.
shopt -s extglob
rm -rf !(test1|test2|test3)
But when i use the same in shell script, i get the below error.
syntax... (6 Replies)
Discussion started by: vino_hymi
6 Replies
8. AIX
Hi, im having some issues after i execute the next command:
tar -cvf /varios/restore/test.tar -X /jfma/test1/excludefile /jfma | gzip -c > /varios/restore/test.tar.gz
this creates the desired "test.tar.gz" file, but whe i try to open it it says "tar: 0511-164 There is a media read or write... (6 Replies)
Discussion started by: blacksteel1988
6 Replies
9. Shell Programming and Scripting
Can you please help tweak the below command to exclude all directories with the name "logs" and "tmp"
find . -type f \( ! -name "*.tar*" ! -name "*.bkp*" \) -exec /usr/xpg4/bin/grep -i "user_1" /dev/null {} + >result.out
bash-3.2$ uname -a
SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v... (9 Replies)
Discussion started by: mohtashims
9 Replies
LEARN ABOUT OPENSOLARIS
ndmp
ndmp(4) File Formats ndmp(4)
NAME
ndmp - configuration properties for Solaris Network Data Management Protocol (NDMP) server
DESCRIPTION
The behavior of the Solaris NDMP server is specified by property values that are stored in the Service Management Facility, smf(5).
An authorized user can use the ndmpadm(1M) command to set global values for these properties in SMF.
You can set the following properties by using the ndmpadm set command:
backup-quarantine Backup the files marked as quarantined by AV. Acceptable values are yes or no. The default is no.
dar-support Set the Direct Access Recovery mode. Acceptable values are yes or no. The default is no.
debug-level Set the debug level. The debug-level can be set to either 0 (off) or 1 (on). The default is 0.
debug-path The path to which to save the debug log. The default is /var/ndmp.
dump-pathnode Enable or disable backing up the directories containing modified files or directories in dump(1) backup format.
Acceptable values are yes or no. The default is no.
ignore-ctime Determines whether the change timestamp (ctime) of files and directories is used to determine whether a file should
be backed up in level backup. If this parameter is set to yes, only the modification time (mtime) of the file or
directory determines whether it should be backed up. Acceptable values are yes or no. The default value is no.
overwrite-quarantine Restore quarantined files on top of current files if they already exist. Acceptable values are yes or no. The
default value is no.
restore-quarantine Restore the files that had been marked as quarantined by AV and are backed up. Acceptable values are yes or no. The
default value is no.
tar-pathnode Enable or disable backing up the directories containing modified files or directories in tar(1) backup format.
Acceptable values are yes or no. The default value is no.
token-maxseq Set the maximum sequence number for subsequent token-based incremental backup in NDMP-V4. The default value is 9.
There are two limits for this value: soft-limit, which is 59, and hard-limit, equal to 64. If the token sequence
number, passed by the DMA, is between the soft and hard limits, a warning message is issued to the DMA. The token
sequence number can never exceed the hard-limit value.
version Set the maximum active NDMP protocol version. Valid values are currently 2, 3, and 4. The default is 4.
The following property can only be set when using the ndmpadm enable or ndmpadm disable command:
auth-type Sets the password encryption type for the authentication of local users. Valid values are cram-md5 or cleartext.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWndmpu, SUNWndmpr |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
SEE ALSO
dump(1), tar(1), ndmpadm(1M), ndmpd(1M), attributes(5), smf(5)
SunOS 5.11 3 Mar 2009 ndmp(4)