Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Take a file from the system and put on tape and reset the file to 0 bytes Post 6551 by rwb1959 on Thursday 6th of September 2001 05:08:50 PM
Old 09-06-2001
You should probably write a script to do this
but assuming you have just user tar (or somthing
like that) to get the file on the tape, upon
successful completion, you could simply do:

> some_file.log

...this will effectively truncate some_file.log
I suggest a shell so that you can check the
exit code for the tar command then based on
success or failure, the script could then
choose to truncate the file or perhaps send
you an email notifcation of the problem.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Tape Reset?????

I'm changing from SCO UNIX to Red Hat Linux. In the UNIX box when backing up my data to tape I usually do this: tape reset sleep 5 nohup tar ................... I want to know if there is a way to do "tape reset" in Red Hat Linux. (1 Reply)
Discussion started by: rrivas
1 Replies

2. UNIX for Advanced & Expert Users

Space free on tape /delete a single file on tape

Hi, I' using a sun solaris server, I would like to known if there is the possibility to control how many space is free on a tape and how I can delete a single file on a tape. Thanks DOMENICO (3 Replies)
Discussion started by: Minguccio75
3 Replies

3. UNIX for Dummies Questions & Answers

Mounting DLT tape and to backup file to tape

Hi there: I'm new here Can anyone help me: I have DS15 Alpha server : Unix 5.1B Now i need to connect a DLVT VS80 1U Rackmount Tape Drive unit. What is the exact comman to mount the DLTape IV?? How do i make backuo @ copy file to the tape? Thanx to all (0 Replies)
Discussion started by: ayzeayem
0 Replies

4. Shell Programming and Scripting

Remove first N bytes and last N bytes from a binary file on AIX.

Hi all, Does anybody know or guide me on how to remove the first N bytes and the last N bytes from a binary file? Is there any AWK or SED or any command that I can use to achieve this? Your help is greatly appreciated!! Best Regards, Naveen. (1 Reply)
Discussion started by: naveendronavall
1 Replies

5. UNIX for Dummies Questions & Answers

Tarred files not being put on tape

Hi I normally backup to tape using the following command in Solaris 9 on SUN Enterprise 3500 server: tar cvf /dev/rmt/0n data but after a power cut, the server went down without being shutdown since the UPS failed. Now when I issue the tar command I get the root (/) being full looks like it... (6 Replies)
Discussion started by: rahmantanko
6 Replies

6. UNIX for Dummies Questions & Answers

X bytes of 0, Y bytes of random data, Z bytes of 5, T bytes of 1. ??

Hello guys. I really hope someone will help me with this one.. So, I have to write this script who: - creates a file home/student/vmdisk of 10 mb - formats that file to ext3 - mounts that partition to /mnt/partition - creates a file /mnt/partition/data. In this file, there will... (1 Reply)
Discussion started by: razolo13
1 Replies

7. Solaris

How to take backup of ZFS file system on a tape drive?

Hi Guys, I want to take backup of a ZFS file system on tape drive. Can anybody help me with this? Thanks, Pras (0 Replies)
Discussion started by: prashant2507198
0 Replies

8. Shell Programming and Scripting

Get file's first x bytes

is there a better way to do this: head -c 10000k /var/dump.log | head -c 6000k unfortunately, the "-c" option is not available on sun solaris. so i'm looking at "dd". but i dont know how to use it to achieve the same exact goal as the above head command. this needs to work on both solaris... (5 Replies)
Discussion started by: SkySmart
5 Replies
AMTAPE(8)						      System Manager's Manual							 AMTAPE(8)

NAME
amtape - user interface to Amanda tape changer controls SYNOPSIS
amtape config command [ command options ] DESCRIPTION
Amtape performs tape changer control operations. It uses the underlying tape changer script defined by the tpchanger option for a particu- lar Amanda configuration as specified by the config argument. Tape changers maintain a notion of the current and next slot for each configuration. These may or may not correspond to an actual physical state of the device, but do tend to minimize searching through the tape storage slots. If the desired tape is in the current slot, it is likely the next tape needed is in the next slot rather than at some random position in the storage slots. See the amanda(8) man page for more details about Amanda. COMMANDS
reset Reset the tape changer to a known state. The current slot is set to the first slot. Other device-specific side effects may occur. Some gravity stackers need to be reset to the top position by hand. This command notifies Amanda the stacker is back in that posi- tion. eject If a tape is loaded in the drive, it is ejected and returned to the slot from which it was loaded. clean If a cleaning tape is defined for the changer, it is used to clean the drive. show Show the contents of all slots. This can be slow. label label Search for and load the Amanda tape with label label. taper Perform the taper scan algorithm. Load the next tape in the configuration's tape sequence, or a fresh tape with a suitable label. device Display the name of the current tape device on stdout. current Display the current slot. update Update the changer label database, if it has one, to match the tapes now available. slot slot Eject any tape in the drive and put it away, then load the tape from slot slot and reset current. slot current Eject any tape in the drive and put it away, then load the tape from the current slot. slot prev Eject any tape in the drive and put it away, then load the tape from the previous slot and reset current. slot next Eject any tape in the drive and put it away, then load the tape from the next slot and reset current. slot first Eject any tape in the drive and put it away, then load the tape from the first slot and reset current. slot last Eject any tape in the drive and put it away, then load the tape from the last slot and reset current. slot advance Eject any tape in the drive and put it away. Advance current to the next tape, but do not load it. This is useful with non-gravity stackers to unload the last tape used and set up Amanda for the next run. If you just use eject, the current tape will be mounted again in the next run, where it will be rejected as being still in use, ejected and the next tape requested. Using slot next followed by eject does an unnecessary mount. Note: most changers optimize the slot commands to not eject the loaded tape if it is the one being requested. AUTHOR
James da Silva <jds@cs.umd.edu> University of Maryland, College Park SEE ALSO
amanda(8) AMTAPE(8)
All times are GMT -4. The time now is 11:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy