- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- gtar for restoring filesystems
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 02:51 AM
07-31-2002 02:51 AM
I have the following filesystems archived into a single S-DLT tape:
/fs26/design1/replica1
/fs26/design2/archive_1
/fs26/design5/cluster/
/fs28/design1/archive_2
/fs29/rctl/circuits
I would like to restore these filesystems beginning with /fs26, /fs28 and /fs29 into /fs26/archive1, /fs28/archive1, /fs29/archive1 respectively.
All of these filesystems have been archived into a single tape.
Is there a way to extract the filesystems out simultaneously and restore these filesystems into the respective areas mentioned simultaneously?
The filesystems have been archived as follows:
# gtar -Scv --verify --files from=jf40322020007 --file=/dev/rmt1
If I were to restore using :
# cd /fs26/design1/replica1
# gtar -xvf --file=/dev/rmt1 /fs26/design1/replica1
I believe I would have to wait for each archived filesystem to complete its restoration process before proceeding to the next.
Also, could someone verify if the extraction and restoration command is correct?
If there is a more efficient way of extracting and restoring these files, can someone show me a script to do this?
Could someone please help me out?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 02:55 AM
07-31-2002 02:55 AM
Re: gtar for restoring filesystems
is ok.
But you will have to to extract one by one or else put them in script.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 03:07 AM
07-31-2002 03:07 AM
Re: gtar for restoring filesystems
Yes you will have to run the command separately to restore /fs26 into /fs26/archive, /fs28 into /fs28/archive, ...
UNLESS you just restore them in another directory (where you have enough disk space) and just MOVE them to their respective directories.
cd /sometempdir
gtar -xvf --file=/dev/rmt1 /dir2restore /dir2restore /dir2restore ...
mv /sometempdir/dir2restore /fs26/archive1
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 03:10 AM
07-31-2002 03:10 AM
Re: gtar for restoring filesystems
I am a bit rusty on pax bu I belive something like this should work:
pax -r -s ',*design*,archive1/design,' -f /dev/rmt1
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 03:11 AM
07-31-2002 03:11 AM
Re: gtar for restoring filesystems
--exclude=pattern
When performing operations, tar will skip files that match pattern.
@FIXME-xref{}.
--exclude-from=file
--files-from=file
-T file
tar will use the contents of file as a list of archive members or
files to operate on, in addition to those specified on the
command-line. @FIXME-xref{}.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 03:13 AM
07-31-2002 03:13 AM
Re: gtar for restoring filesystems
By putting the command :
gtar -xvf --file=/dev/rmt1 /fs26/design1/replica1
into a script, do you mean I'd have to do the following in the script:
#cat tarScript.sh
#!/bin/sh
cd /fs26/archive1
gtar -xvf --file=/dev/rmt1 /fs26/design1/replica1
gtar -xvf -- file=/dev/rmt1 /fs26/design2/archive_1
... (the list goes on for /fs26
cd /fs28/archive1
gtar -xvf --file=/dev/rmt1 /fs28/design1/archive_2
cd /fs29/archive1
gtar -xvf --file=/dev/rmt1 /fs29/rctl/circuits
OR, can I do the following:
#cat tarScript.sh
#!/bin/sh
cd /fs26/archive1
gtar -xvf --file=/dev/rmt1 /fs26/design1/replica1
gtar -xvf -- file=/dev/rmt1 /fs26/design2/archive_1
... (the list goes on for /fs26
#tarScript.sh
#cat tarScript.sh
cd /fs28/archive1
gtar -xvf --file=/dev/rmt1 /fs28/design1/archive_2
#tarScript.sh
Meaning that I'm accessing different filesystems archived in the same single tape simultaneously. Is this possible??
Could you help me out?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 03:23 AM
07-31-2002 03:23 AM
Re: gtar for restoring filesystems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 03:28 AM
07-31-2002 03:28 AM
Re: gtar for restoring filesystems
Thanks for the reply.
However, based on your reply:
--exclude=pattern
When performing operations, tar will skip files that match pattern.
@FIXME-xref{}.
--exclude-from=file
--files-from=file
-T file
tar will use the contents of file as a list of archive members or
files to operate on, in addition to those specified on the
command-line. @FIXME-xref{}.
I tried including filesystems to be excluded in a file, i.e:
#cat exclude.txt
/fs28/design1/archive_2
/fs29/rctl/circuits
#cd /fs26/archive1
#gtar -xvf --exclude-from=exclude.txt --file=/dev/rmt1
It did not exclude the files which should have excluded when restoring /fs26 stuffs in /fs26/archive1.
Could you help me out?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 03:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 04:37 PM
07-31-2002 04:37 PM
Re: gtar for restoring filesystems
I was wondering if you tell me if I could do the following:
I thought of having scripts which would access the single tape and extract the all filesystems in it into their respective paths simultaneously during restoration?
#cat tarScript_1.sh
#!/bin/sh
cd /fs26/archive1
gtar -xvf --file=/dev/rmt1 /fs26/design1/replica1
gtar -xvf -- file=/dev/rmt1 /fs26/design2/archive_1
... (the list goes on for /fs26
#tarScript.sh
#cat tarScript_2.sh
cd /fs28/archive1
gtar -xvf --file=/dev/rmt1 /fs28/design1/archive_2
#tarScript.sh
Could you please help me out?
Thanks.
CJ