Sponsored Content
Top Forums Shell Programming and Scripting Help using pax to restore into current directory? Post 303036462 by c3rb3rus on Thursday 27th of June 2019 10:02:11 AM
Old 06-27-2019
Quote:
Originally Posted by MadeInGermany
That is why you better make the backup without the leading /, for example (cd / && tar cf - .) instead of tar cf - /.
But IMHO you can tell pax to make some modifications. RTFM:
Code:
man pax

RTFM? Really?

Did you even read the post? It clearly states I already tried using -s (ReplacementString) without success, how do you think I got to this parameter?

No, I cannot use cd/tar since I am doing this in a script and grabbing dozen or so different directives and sending them to tape.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

filename in current directory

I want to perform a task on all the files in the current directory but I'd like to loop through them one at a time. How do I tell it to give me the first filename? (2 Replies)
Discussion started by: calgone337
2 Replies

2. Shell Programming and Scripting

Finding files in current directory when 100,000's files in current directory

Hi All I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age. I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies

3. AIX

Restore a directory from backup

Dear All: we are using backup command on AIX to take backup as below in this command we also add compress command ulimit unlimited cd /apps/oracle find orcldb orcldata arch |tee /apps/orabkp/ofgl.faysalbank.com-17Jun10Thu-ORCL-DB.bkp.gz.log | backup -ivqf - |gzip -c >... (0 Replies)
Discussion started by: lodhi1978
0 Replies

4. UNIX for Dummies Questions & Answers

Unable to restore cpio archive to a directory

Hello Every one, I want to back up all passwd files to /xyz/passfiles.cpio and Then restore them to /abc directory. Here is what I wrote: find / -name passwd | cpio -oc > /tmp/passwd.cpio and to restore cd abc cpio -ium < /tmp/passwd.cpio I can not find the files restored to /abc... (2 Replies)
Discussion started by: drdigital_m
2 Replies

5. Shell Programming and Scripting

tarball of current directory

I wanna make a backup tarball. I wanna write a script that makes tarball of the current directory. There are lots of files so I cant type all files, I wanna make the tarball by excluding few files. Like there 1000 files in a directory I wanna create a tarball containing 98 files of that... (1 Reply)
Discussion started by: nishrestha
1 Replies

6. UNIX for Advanced & Expert Users

current directory in awk

Hello, I want to use the string with the current directory in my awk command. I tried: 'pwd=system("pwd")' but it doesn't work. can please help somebody? (2 Replies)
Discussion started by: daWonderer
2 Replies

7. AIX

Using restorevgfiles to restore entire directory from rootvg problems

I am trying to restore a specific directory and all sub-directories therein using a rootvg tape. I am using the following command to make the backup: mksysb -m -i -v /dev/rmt0 However, I am getting the following result: tctl status rmt0 Available 04-08-00-0,0 LVD SCSI 4mm Tape Drive... (10 Replies)
Discussion started by: herot
10 Replies

8. UNIX for Dummies Questions & Answers

How to email the current directory?

Hi, I'm very new to Unix, but have been given a command to type in which is : mail -s <email subject goes here> <my email address> <success.txt this command is quite a basic one and sends an email containing the contents of the file "success.txt" to whatever email I put in with the subject of... (2 Replies)
Discussion started by: rnmuk
2 Replies

9. UNIX for Dummies Questions & Answers

How to get the current directory Path?

How to get the current directory Path in your prompt? i am getting a $ mark only in my prompt? Please help me with this (3 Replies)
Discussion started by: Abhishek0683
3 Replies

10. AIX

Restore directory and contents from tape

Hi, I have taken a backup of a directory on my tape in using below command cd /backup find * -print|backup -ivf '/dev/rmt0' '-U' |tee -a /syslogs/backup.log and output appear in below format. a 0 rman-before-08032014 a 58403323904... (2 Replies)
Discussion started by: m_raheelahmed
2 Replies
restore(1M)															       restore(1M)

NAME
restore, rrestore - restore file system incrementally, local or across network SYNOPSIS
key [name ...] key [name ...] DESCRIPTION
The and commands read tapes previously dumped by the or command (see dump(1M) and rdump(1M)). Actions taken are controlled by the key argument where key is a string of characters containing not more than one function letter and pos- sibly one or more function modifiers. One or more name arguments, if present, are file or directory names specifying the files that are to be restored. Unless the modifier is specified (see below), the appearance of a directory name refers to the files and (recursively) subdi- rectories of that directory. Function Portion of key The function portion of the key is specified by one of the following letters: Read the tape and load into the current directory. should be used only after careful consideration, and only to restore a complete dump tape onto a clear file system, or to restore an incremental dump tape after a full level zero restore. Thus, is a typical sequence to restore a complete dump. Another or can then be performed to restore an incremental dump on top of this. Note that and leave a file in the root directory of the file system to pass information between incremental restore passes. This file should be removed when the last incremental tape has been restored. A or followed by a and a or is used to change the size of a file system (see newfs(1M)). and request a particular tape of a multivolume set on which to restart a full restore (see above). This provides a means for interrupting and restarting and Extract the named files from the tape. If the named file matches a directory whose contents had been written onto the tape, and the modifier is not specified, the directory is recursively extracted. The owner, modification time, and mode are restored (if possible). If no file argument is given, the root directory is extracted, which results in the entire contents of the tape being extracted, unless has been specified. Names of the specified files are listed if they occur on the tape. If no file argument is given, the root directory is listed, which results in the entire content of the tape being listed, unless has been specified. The next argument to is used as the dump file number to recover. This is useful if there is more than one dump file on a tape. This mode allows interactive restoration of files from a dump tape. After reading in the directory information from the tape, and provide a shell-like interface that allows the user to move around the directory tree selecting files to be extracted. The available commands are given below; for those commands that require an argument, the default is the current directory. The current directory or specified argument is added to the list of files to be extracted. If a directory is specified, it and all its descendents are added to the extraction list (unless the key is specified on the command line). File names on the extraction list are displayed with a leading when listed by Change the current working directory to the specified argument. The current directory or specified argument is deleted from the list of files to be extracted. If a directory is specified, it and all its descendents are deleted from the extraction list (unless is specified on the command line). The most expedient way to extract files from a directory is to add the directory to the extraction list, then delete unnecessary files. All files named on the extraction list are extracted from the dump tape. and ask which volume the user wants to mount. The fastest way to extract a few files is to start with the last volume, then work toward the first volume. List a summary of the available commands. List the current or specified directory. Entries that are directories are displayed with a trailing Entries marked for extraction are displayed with a leading If the verbose key is set, the inode number of each entry is also listed. Print the full path name of the current working directory. and immediately exit, even if the extraction list is not empty. Set the owner, modes, and times of all directories that are added to the extraction list. Nothing is extracted from the tape. This setting is useful for clean- ing up after a restore aborts prematurely. The sense of the modifier is toggled. When set, the verbose key causes the command to list the inode numbers of all entries. It also causes and to print out information about each file as it is extracted. Function Modifiers The following function modifier characters can be used in addition to the letter that selects the function desired: Specify the block size of the tape in kilobytes. If the option is not specified, and try to determine the tape block size dynamically. Specify the name of the archive instead of If the name of the file is reads from standard input. Thus, and can be used in a pipeline to dump and restore a file system with the command When using this key should be specified, and the next argument supplied should be of the form Extract the actual directory, rather than the files to which it refers. This prevents hierarchical restoration of complete subtrees from the tape, rather than the files to which it refers. Extract by inode numbers rather than by file name. This is useful if only a few files are being extracted and one wants to avoid regenerating the complete path name to the file. Type the name of each file and treat, preceded by its file type. Normally and do their work silently; the modifier specifies verbose output. Do not ask whether to abort the operation if and encounters a tape error. and attempt to skip over the bad tape block(s) and continue. creates a server, either or on the remote machine to access the tape device. DIAGNOSTICS
and complain about bad key characters. and complain if a read error is encountered. If the modifier has been specified, or the user responds and attempt to continue the restore. If the dump extends over more than one tape, and ask the user to change tapes. If the or function has been specified, and also ask which volume the user wants to mount. The fastest way to extract a few files is to start with the last volume and work towards the first volume. There are numerous consistency checks that can be listed by and Most checks are self-explanatory or can ``never happen''. Here are some common errors: The specified file name was listed in the tape directory but not found on the tape. This is caused by tape read errors while looking for the file, and from using a dump tape created on an active file system. A file not listed in the directory showed up. This can occur when using a dump tape created on an active file system. When doing an incremental restore, a tape that was written before the previous incremental tape, or that has too low an incremental level has been loaded. When doing an incremental restore, a tape that does not begin its coverage where the previous incremental tape left off, or that has too high an incremental level has been loaded. A tape read error has occurred. If a file name is specified, the contents of the restored files are probably partially wrong. If restore is skipping an inode or is trying to resynchronize the tape, no extracted files are corrupted, although files may not be found on the tape. After a tape read error, and may have to resynchronize themselves. This message indicates the number of blocks skipped over. WARNINGS
and can get confused when doing incremental restores from dump tapes that were made on active file systems. A level zero dump (see dump(1M)) must be done after a full restore. Since restore runs in user code, it has no control over inode alloca- tion; thus a full dump must be done to get a new set of directories reflecting the new inode numbering, even though the contents of the files are unchanged. AUTHOR
and were developed by the University of California, Berkeley. FILES
Default tape drive. File containing directories on the tape. Owner, mode, and time stamps for directories. Information passed between incremental restores. SEE ALSO
dump(1M), mkfs(1M), mount(1M), newfs(1M), rmt(1M), mt(7). restore(1M)
All times are GMT -4. The time now is 06:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy