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
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
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
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
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
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
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
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
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
SMBTAR(1) User Commands SMBTAR(1)
NAME
smbtar - shell script for backing up SMB/CIFS shares directly to UNIX tape drives
SYNOPSIS
smbtar [-r] [-i] [-a] [-v] {-s server} [-p password] [-x services] [-X] [-N filename] [-b blocksize] [-d directory] [-l loglevel] [-u user]
[-t tape] {filenames}
DESCRIPTION
This tool is part of the samba(7) suite.
smbtar is a very small shell script on top of smbclient(1) which dumps SMB shares directly to tape.
OPTIONS
-s server
The SMB/CIFS server that the share resides upon.
-x service
The share name on the server to connect to. The default is "backup".
-X
Exclude mode. Exclude filenames... from tar create or restore.
-d directory
Change to initial directory before restoring / backing up files.
-v
Verbose mode.
-p password
The password to use to access a share. Default: none
-u user
The user id to connect as. Default: UNIX login name.
-a
Reset DOS archive bit mode to indicate file has been archived.
-t tape
Tape device. May be regular file or tape device. Default: $TAPE environmental variable; if not set, a file called tar.out .
-b blocksize
Blocking factor. Defaults to 20. See tar(1) for a fuller explanation.
-N filename
Backup only files newer than filename. Could be used (for example) on a log file to implement incremental backups.
-i
Incremental mode; tar files are only backed up if they have the archive bit set. The archive bit is reset after each file is read.
-r
Restore. Files are restored to the share from the tar file.
-l log level
Log (debug) level. Corresponds to the -d flag of smbclient(1).
ENVIRONMENT VARIABLES
The $TAPE variable specifies the default tape device to write to. May be overridden with the -t option.
BUGS
The smbtar script has different options from ordinary tar and from smbclient's tar command.
CAVEATS
Sites that are more careful about security may not like the way the script handles PC passwords. Backup and restore work on entire shares;
should work on file lists. smbtar works best with GNU tar and may not work well with other versions.
DIAGNOSTICS
See the DIAGNOSTICS section for the smbclient(1) command.
VERSION
This man page is correct for version 3 of the Samba suite.
SEE ALSO
smbd(8), smbclient(1), smb.conf(5).
AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open
Source project similar to the way the Linux kernel is developed.
Ricky Poulten wrote the tar extension and this man page. The smbtar script was heavily rewritten and improved by Martin Kraemer. Many
thanks to everyone who suggested extensions, improvements, bug fixes, etc. The man page sources were converted to YODL format (another
excellent piece of Open Source software, available at ftp://ftp.icce.rug.nl/pub/unix/) and updated for the Samba 2.0 release by Jeremy
Allison. The conversion to DocBook for Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0 was done by
Alexander Bokovoy.
Samba 3.5 06/18/2010 SMBTAR(1)