Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

cpio restore can we make it faster?

Posted on 1999-01-12
3
Medium Priority
?
249 Views
Last Modified: 2013-12-26
Currently, we use the following command to backup our data:
find. -depth -print | cpio -ocBL -O /dev/rct0
but the problem is when we want to restore a single file we use
cpio -vicdumBA -l/dev/rct0 filexx   this take forever to restore, how can we make it faster. I am dying here please help. thanks
0
Comment
Question by:petro2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1295385
remove A option from cpio
0
 
LVL 3

Accepted Solution

by:
mliberi earned 100 total points
ID: 1295386
At restore time the cpio command must read the whole block, even if you must restore a single file.

You could split the huge block to many little blocks. The restore operation could be done in two steps:
1) seek the block containing the file
2) read the block for file extraction

The first operation is very fast compared to the second.

Example: (I'm supposing that /dev/rct0.1 is the NO REWIND version of /dev/rct device, please check your os man pages)
               *** BACKUP ***
$ find A | cpio -ocBL -O/dev/rct0.1 # create first block on tape
$ find B | cpio -ocBL -O/dev/rct0.1 # create second block
.
$ find Z | cpio -ocBL -O/dev/rct0.1 # creat n-th block

let's suppose we want to extract a file within directory Z (n-th block)
$ tctl -f /dev/rct0 fsf <n-1>   # seek n-th block, FF very quick
$ cpio -vicdumBA -l/dev/rct0 filexx # extract filexx
0
 

Author Comment

by:petro2
ID: 1295387
It from this point forward, I was hoping for a miracle, an answer that would work on some of the old backups thanks
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question