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
Discussions
Discussions
Forums
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
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
тАО12-12-2008 01:32 PM
тАО12-12-2008 01:32 PM
GZIP
I've created a backup file with following command:
find . -depth -print | cpio -ocv | gzip > /backup/backup.cgz
Now I want to restore some files from the archive.
I was struggling with finding how can I do a partial restore.
For example I need to restore only /dev directory.
Please help
Regards
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2008 03:37 PM
тАО12-12-2008 03:37 PM
Re: GZIP
gunzip -c /backup/backup.cgz|cpio -idx /dev/*
Please try restoring another directory before extracting the /dev, to test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2008 03:40 PM
тАО12-12-2008 03:40 PM
Re: GZIP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2008 04:39 PM
тАО12-12-2008 04:39 PM
Re: GZIP
It's hard to believe that an unquoted
wildcard like
/dev/*
on the command line would do anything like
what you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2008 06:02 PM
тАО12-14-2008 06:02 PM
Re: GZIP
Anyway, you can find out the names of the files in the backup with
gunzip -c < /backup/backup.cgz | cpio -t
If you really did use "find . -depth -print", then the names will all begin with "./". Specify the directory you want to retrieve beginning with that "./", e.g.,
gzip -c < /backup/backup.cgz | cpio -i ./foo
Remember that the extracted directory will be relative to your current directory (result of pwd) when you run the command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-15-2008 06:44 AM
тАО12-15-2008 06:44 AM
Re: GZIP
Now I'm in the same directory and I do :
rm -fr /tmp
[root@localhost /]# gunzip -c /backup/backup.cgz|cpio -id /tmp
6481003 blocks
But no /tmp directrory is created
Please advice
Regards
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-15-2008 07:00 AM
тАО12-15-2008 07:00 AM
Re: GZIP
> [...] you can find out the names of the
> files in the backup with
> [...]
Read that part again. Repeat as needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-15-2008 07:08 AM
тАО12-15-2008 07:08 AM
Re: GZIP
cpio: warning: skipped 49742 bytes of junk
cpio: warning: skipped 15654 bytes of junk
cpio: premature end of file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-15-2008 09:16 AM
тАО12-15-2008 09:16 AM
Re: GZIP
Looks like you're cpio archive didn't complete properly. Are you sure you didn't see warning/error messages when backing up or is the backup line you quote in a cron script directing messages to /dev/null?
I tend to prefer using tar myself. It has gzip and bzip2 functionality built into it, so the backup line you use above would look something like this:
GZIP
# tar -czvf /backup/backup.tgz .
BZIP2
# tar -cjvf /backup/backup.tbz2 .
Again you need to ensure that the archive file being created is not part of the directory structure being archived otherwise you have problems.