Sponsored Content
Top Forums Shell Programming and Scripting Start copying large file while its still being restored from tape Post 302538586 by Corona688 on Wednesday 13th of July 2011 12:22:33 PM
Old 07-13-2011
I'd put tail in the background instead of your tape restore. You can just create an empty file to make sure tail doesn't throw an error.
Code:
: > localfile # Truncate or create zero byte file
tail -f filename > /path/to/nfsfile &
restore_from_tape > localfile

---------- Post updated at 10:22 AM ---------- Previous update was at 10:19 AM ----------

The trouble comes from how to tell tail when it's finished. It's binary-safe I think, but only writes entire lines -- inconvenient when your file may not actually end in a newline. You may have to append a newline onto your local file to kick the last 'line' out of it: echo >> filename Then wait for the file sizes to be equal, kill tail, and truncate both files one byte shorter.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

copying a large filesystem

Hi there In my organisation we have a solaris network with /home being automounted from /export/home on a central file server (usual stuff) however, the guy who originally set this up only allocated 3gb to /export/home and now we are really struggling for space. I have a new 18gb disk installed... (3 Replies)
Discussion started by: hcclnoodles
3 Replies

2. Filesystems, Disks and Memory

Strange difference in file size when copying LARGE file..

Hi, Im trying to take a database backup. one of the files is 26 GB. I am using cp -pr to create a backup copy of the database. after the copying is complete, if i do du -hrs on the folders i saw a difference of 2GB. The weird fact is that the BACKUP folder was 2 GB more than the original one! ... (1 Reply)
Discussion started by: 0ktalmagik
1 Replies

3. UNIX for Dummies Questions & Answers

Writing large files to tape

I have a zipped file that is ~ 10GB. I tried tarring it off to a tape, but I receive: tar: <filename> too large to archive. Use E function modifier. The file is stored on a UFS mount, so I was unable to use ufsdump. What other options do I have? (I don't have a local file system large... (3 Replies)
Discussion started by: FredSmith
3 Replies

4. AIX

Copying to tape drive throws error

Hi All I am trying to copy files present in a partition (server 2) which is mounted to a different server (server 1) as tape drive is connected to it. I ran the below command to copy files within a partition: svr01:root:/sunfileserver> tar -cvf * a <foldername>/<filename>/<filename> a... (4 Replies)
Discussion started by: vathsan
4 Replies

5. UNIX for Dummies Questions & Answers

Copying large file problem on SVR4 Unix

We have 3 Unix servers all running SVR4 Unix 1.4. I have no problems copying files to and from 2 of the servers using either the rcp command or ftp but when i come to transfer large files to the third server the copy gives up part way through and crashes this server. Copying smaller files using RCP... (7 Replies)
Discussion started by: coatesd
7 Replies

6. Shell Programming and Scripting

Copying of large files fail

Hi, I have a process which duplicates files for different environments. As the files arrive, my script (korn shell) makes copies of them (giving a unique name) and then renames the original file so that my process won't get triggered again. I don't like it either, but it's what we were told to... (4 Replies)
Discussion started by: GoldenEye4ever
4 Replies

7. UNIX for Dummies Questions & Answers

Copying a Large File

I have a large file that I append entries to the end of every few seconds. Its grown to >150MB. Its basically a log file but a perl script is writing to it. I need to make a copy of it to a new directory. I realize the latest entries occuring while the copy is taking place will not be recorded... (1 Reply)
Discussion started by: lforum
1 Replies

8. Shell Programming and Scripting

Copying number by looking a large file

Hi All, I have a big file which looks like this: abc 34.32 cdf 343.45 computer 1.34 ladder 2.3422 I have some 100000 .TXT files which look like this: computer cdf align I have to open each of the text files and read the words from the text files. Then I have to look into that... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies

9. UNIX for Dummies Questions & Answers

Copying tape-to-tape on UNIX

I am using a 4mm tape to backup my Unix system. However, I wanted to make a copy all of the files and archive headers (or just the archive headers if that's possible) created on one of my tapes to another 4mm tape. I only have one tape drive. Is there a command that will complete such task? ... (1 Reply)
Discussion started by: acoco
1 Replies

10. Shell Programming and Scripting

Copying large files in a bash script stops execution

Hello, I'm new to this forum and like to first of all say hello to everyone. I've got a really annoying problem at the moment. I'm trying to rsync some files (about 200MB with one file of 120MB) from a Raspberry PI with raspbian to a debian server via rsync. This procedure is stored in a... (3 Replies)
Discussion started by: wex_storm
3 Replies
RESTOR(8)						      System Manager's Manual							 RESTOR(8)

NAME
restor - incremental file system restore SYNOPSIS
restor key [ argument ... ] DESCRIPTION
Restor is used to read magtapes dumped with the dump command. The key specifies what is to be done. Key is one of the characters rRxt optionally combined with f. f Use the first argument as the name of the tape instead of the default. r or R The tape is read and loaded into the file system specified in argument. This should not be done lightly (see below). If the key is R restor asks which tape of a multi volume set to start on. This allows restor to be interrupted and then restarted (an icheck -s must be done before restarting ). x Each file on the tape named by an argument is extracted. The file name has all `mount' prefixes removed; for example, /usr/bin/lpr is named /bin/lpr on the tape. The file extracted is placed in a file with a numeric name supplied by restor (actually the inode number). In order to keep the amount of tape read to a minimum, the following procedure is recommended: Mount volume 1 of the set of dump tapes. Type the restor command. Restor will announce whether or not it found the files, give the number it will name the file, and rewind the tape. It then asks you to `mount the desired tape volume'. Type the number of the volume you choose. On a multivolume dump the recom- mended procedure is to mount the last through the first volume in that order. Restor checks to see if any of the files requested are on the mounted tape (or a later tape, thus the reverse order) and doesn't read through the tape if no files are. If you are working with a single volume dump or the number of files being restored is large, respond to the query with `1' and restor will read the tapes in sequential order. If you have a hierarchy to restore you can use dumpdir(8) to produce the list of names and a shell script to move the resulting files to their homes. t Print the date the tape was written and the date the file system was dumped from. The r option should only be used to restore a complete dump tape onto a clear file system or to restore an incremental dump tape onto this. Thus mkfs /dev/hp0a 4807 restor r /dev/hp0a is a typical sequence to restore a complete dump. Another restor can be done to get an incremental dump in on top of this. A dump followed by a mkfs and a restor is used to change the size of a file system. FILES
/dev/rmt1 default file name rst* temporary files SEE ALSO
dump(8), dumpdir(8), mkfs(8) DIAGNOSTICS
There are various diagnostics involved with reading the tape and writing the disk. There are also diagnostics if the i-list or the free list of the file system is not large enough to hold the dump. If the dump extends over more than one tape, it may ask you to change tapes. Reply with a newline when the next tape has been mounted. Dump tapes made before the new ondisc directory structure will be converted automatically by restor . BUGS
There is redundant information on the tape that could be used in case of tape reading problems. Unfortunately, restor does't use it. 3rd Berkeley Distribution RESTOR(8)
All times are GMT -4. The time now is 06:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy