- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cpio.
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
08-23-2000 10:27 PM
08-23-2000 10:27 PM
Please suggest me. How to use "cpio" backup files system and
restore all files/specify files system from tape.
Thanks advance for your answer.
Worapoj P.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2000 11:11 PM
08-23-2000 11:11 PM
SolutionFull backup to a local tape using cpio:
A full backup from your root disk must include the hidden and special device files. At
HPUX 10.x and 11.x find will automatically find hidden files so the -hidden option does
not apply on 10.x and 11.x.
Running the following commands will write a full backup onto the target tape(s):
# cd /
# /etc/shutdown -y 0 (single user mode is recommended)
# find . -depth -xdev | cpio -ovcxB > /dev/rmt/0m
Reading the contents of a cpio tape:
1.To determine what is written on the `cpio` tape:
# cpio -ictvB < /dev/rmt/0m
# cpio -itvB < /dev/rmt/0m
Note: The c option must be used in the input mode if it was used in the output
mode.
Reading the contents of a tape may take a few minutes (6 or 7 seconds per
megabyte) because the contents of the tape have to be read from the starting point
all the way through to the end of that cpio archive. The cpio does not have an
index or directory copy on tape, so the files that are listed are the files that are
actually on the tape.
2.To create a file containing the list of files stored on the cpio archive:
# cpio -ictvB < /dev/rmt/0m > /tmp/index
3.Relative versus absolute paths:
If the file name listing starts with a / then the cpio archive is written in an absolute
path format. This means that the files will be recovered to that absolute location, no
matter what directory the cpio restore command is given from.
Absolute path:
100666 user group Apr 2 18:21:30 1999 /tmp/xyz
Relative path:
100666 user group Apr 2 18:21:30 1999 tmp/xyz
Restoring a cpio archive from tape:
1.Set your current directory to the destination directory.
# cd /dir
Files will only be restored relative to this destination directory if the were backed
up with relative pathnames. If they were backed up with full pathnames, they will
be restored to the same location they were backed up.
2.Restore the required set of files:
Restore all files: (Files will be restored under the working directory if the
tape was written with relative paths.)
# cpio -icvdxumB < /dev/rmt/0m
Restore files by pattern:
# cpio -icvdxumB < /dev/rmt/0m `xyz/*`
Restore specific files:
# cpio -icvdxumB < /dev/rmt/0m dir1... dir2...
dir3...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2000 11:13 PM
08-23-2000 11:13 PM
Re: cpio.
To backup files, file system
# find /home -print| cpio -ocxBv > /dev/rmt/0m
To see a listing of files,
# cpio -icBvumd < /dev/rmt/0m
To restore a file, files from backup,
# cpio -icBudxv < /dev/rmt/0m
# cpio -icBxv /etc/passwd < /dev/rmt/0m
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2000 01:12 AM
08-24-2000 01:12 AM
Re: cpio.
Where I can get DOC ID KBAN00000271 ?
Best Regards,
Worapoj P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2000 01:39 AM
08-24-2000 01:39 AM