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
FLEXBACKUP(1)						      General Commands Manual						     FLEXBACKUP(1)

NAME
flexbackup - a flexible backup/archiving tool SYNOPSIS
flexbackup [OPTION] DESCRIPTION
Flexbackup is a perl script front-end to various low-level archiving utilities such as tar, dump/restore, cpio, and others. BACKUP OPTIONS
flexbackup -dir <dir> Backup a directory tree starting from path "path" using level 0 (full). flexbackup -set all Backup all sets defined in flexbackup.conf(5) using level 0 (full). flexbackup -set <tag> Backup a set named "tag" using level 0 (full). The set name is defined in flexbackup.conf(5). flexbackup [...] -level <0-9 | full | differential | incremental> Change backup level to a number "0-9", or one of the symbolic names: "full" (level 0); "differential" (level 1); "incremental" (pre- vious backup level + 1). flexbackup [...] -pkgdelta <rpm | freebsd> Prune backup to files not part of a package or changed from distributed version. flexbackup [...] -wday <0-7> Backup only if the week day matches the input number. Sunday is 0 or 7. flexbackup [...] -pipe Write backup data to stdout rather than file/device. flexbackup [...] -ignore-errors Continue backups even if commands return error status RESTORE OPTIONS
flexbackup -list List files in archive. flexbackup -extract Extract (restore) all files from archive into your current working directory. flexbackup -extract -flist <filelist> Extract (restore) the files listed in text file "filelist" into your current working directory. flexbackup -extract -onefile <filename> Extract (restore) the single file named "filename" into your current working directory. flexbackup -compare Compare the archive with the files in your current working directory. flexbackup -restore Interactive restore (dump type only for now). flexbackup [...] -num <n> Read file number "n" from tape. If not given uses current tape position. flexbackup [...] <archive> If archiving to files rather than a device, use file named "archive" for the list/extract/compare/restore operations. flexbackup [...] -pipe Read backup data from stdin rather than file/device. INDEXING OPTIONS
flexbackup -toc List current device's table of contents. flexbackup -toc all List all known table of contents. flexbackup -toc <key> List table of contents for specific database index key named "key". flexbackup -rmindex all Force delete all database index info. flexbackup -rmindex <key> Force delete specified database tape/dir index key named "key". flexbackup -rmindex <key:file> Force delete specified database tape/dir index key named "key", file number "file". MISCELLANEOUS OPTIONS
flexbackup -newtape Erase and create new index key (but don't do any backups). flexbackup -rmfile all If archiving to files rather than device, remove all files and index information. flexbackup -rmfile <file> If archiving to files rather than device, remove the file named "file" and its index information. flexbackup [...] -c <file.conf> Use file named "file.conf" for configuration information instead of /etc/flexbackup.conf(5). flexbackup [...] -type <type> Override $type setting from config file with "type". flexbackup [...] -compress <type> Override $compress setting from config file with "type". flexbackup [...] -device <device> Override $device setting from config file with "device". flexbackup [...] -d <'setting=value'> Override $setting setting from config file with "value". flexbackup -dir <dir> -erase Force a rewind/erase before backup of directory named "dir". flexbackup -dir <dir> -norewind Do not rewind tape after a single backup of directory named "dir". flexbackup -set <tag> -noreten Do not retension tape for level 0 (full) backups of set named "tag". flexbackup -set <tag> -noerase Do not rewind/erase tape for level 0 (full) backups of set named "tag". flexbackup [...] -reten Force a retension of tape before reading. flexbackup [...] -defaults Do not use any default values for config variables. flexbackup -version Display version and exit. TESTING
/DEBUGGING OPTIONS flexbackup -test-tape-drive Tries writing/reading files to make sure you have tape driver and parameters set up correctly in flexbackup.conf(5). flexbackup [...] -n Don't run actual dump or mt commands, just print the steps that would be taken (dry run). flexbackup [...] -type filelist Run a special backup type that just saves a list of files that would have been archived. FILES
/etc/flexbackup.conf - configuration settings REPORTING BUGS
Report bugs to (flexbackup-help@lists.sourceforge.net) AUTHOR
Written by Edwin Huffstutler (edwinh@computer.org) SEE ALSO
flexbackup.conf(5) afio(1) mt(1) tar(1) star(1) cpio(1) dump(1) restore(1) buffer(1) mbuffer(1) Flexbackup Oct 2003 FLEXBACKUP(1)
All times are GMT -4. The time now is 08:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy