Backup files to tape drive on solaris


 
Thread Tools Search this Thread
Operating Systems Solaris Backup files to tape drive on solaris
# 1  
Old 04-28-2010
Backup files to tape drive on solaris

Hi,
I want to take backup of files older than 20 days from a directory onto a tape drive on remote machine on Solaris.
The files are of format abc-20100301000000.gz on my local machine.
I know the below commands for searching files older than x days and command for backup procedure.
Code:
solar1 # ufsdump 0uf Hostname OR IP:backup_drive_name  files_path

Code:
solar1 # find backup_files_path -mtime +10

I want to use the combined command to take backup of files older than 20 days in my shell script.
Can someone suggest me.

Regards,
Jyothi
jyothi_wipro
# 2  
Old 04-28-2010
Code:
for FILE in `find /path/to/directory -mtime +20`
   do echo $FILE
        /usr/sbin/ufsdump 0uf Hostname OR IP:backup_drive_name  files_path

# 3  
Old 04-28-2010
Quote:
Originally Posted by solaris_user
Code:
for FILE in `find /path/to/directory -mtime +20`
   do echo $FILE
        /usr/sbin/ufsdump 0uf Hostname OR IP:backup_drive_name  files_path

That won't work.

Quote:
Originally Posted by jyothi_wipro
I want to take backup of files older than 20 days from a directory onto a tape drive on remote machine on Solaris.
The files are of format abc-20100301000000.gz on my local machine.
I know the below commands for searching files older than x days and command for backup procedure.
That might be this:
Code:
ufsdump 0u $(find /path/to/directory -type f -name "abc-*.gz")

but it's probably not the right way to use ufsdump unless you already made a full level 0 dump.
Tar, cpio, pax or zip would be better and more portable choices.
# 4  
Old 04-28-2010
Jillagre thanks on usefull information Smilie
# 5  
Old 04-29-2010
Backup files to tape drive on solaris

Hi,
Thanks solaris_user and jlliagre for ur reply.
But Iam hanged up with the problem in taking the backup of the files.
I have a directory from which i want to find the files older than x days and move them to temp dir.
But the prob is wen i run the command i get "/usr/bin/find: Arg list too long " error and Iam unable to move further for using ufsdump command.

Iam using the find command as below:
Code:
find /dir_path/*.gz -mtime +148 -exec mv {} temp \;

Am i missing something? or is there any other way to find the files and move them?

Please guide me..

Regards,
Jyothi
jyothi_wipro
# 6  
Old 04-29-2010
Quote:
Originally Posted by jyothi_wipro
Iam using the find command as below:
Code:
find /dir_path/*.gz -mtime +148 -exec mv {} temp \;

Am i missing something? or is there any other way to find the files and move them?
This will work much better:
Code:
find /dir_path -name "*.gz" -mtime +148 -exec mv {} temp +

# 7  
Old 04-29-2010
Quote:
This will work much better:


Code:
find /dir_path -name "*.gz" -mtime +148 -exec mv {} temp +
Thanks jlliagre for the command.But that gave "find: incomplete statement" error
Hence i removed the + and ran the command as

Code:
find /dir_path -name "*.gz" -mtime +148 -exec mv {} temp \;

And say what..... It is working!!!!!!!!!!! Smilie

Regards,
Jyothi
jyothi_wipro
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. Solaris

possible to do ufsdump backup without a tape drive ?

hi friends, i am trying to patch a solaris 9 server. However i need to do a ufsdump backup before any patching. There is no hardware port for connecting the tape drive. Any other ways to do a ufsdump ? :wall: (2 Replies)
Discussion started by: Exposure
2 Replies

3. Solaris

Backup to remote tape drive

Hello all, I'm trying to backup some files on a solaris 10 machine to the remote tape drive connected to another solaris 10 machine. I have set up rsh to allow for password-less connection between the servers, but I'm not able to write to the tape with the command: root@sdp4a>tar cvf... (1 Reply)
Discussion started by: kerrygold
1 Replies

4. UNIX for Dummies Questions & Answers

I cannot restore my backup from my exabyte tape drive

Hi All, I have an old Unix system used by a client as a backup server.I installed an Exabyte tape drive and on restarting the server and during POSTs, the system recognizes the tape drive with its scsi id. On running the command devstat -IAF, the system sees the tape drive quite well. When... (1 Reply)
Discussion started by: ezleone
1 Replies

5. HP-UX

tape drive access/backup

Need assistance: Have HP Visualize C3600 workstation, HP-UX 10.20, and HP C6364A 12GB DDS-3 SCSI DAT drive. I am not a UNIX programmer and did not configure/build workstation. Ran ioscan and shows up as HPC1537A, class tape, and 10/0/15/0.2.0. Switch on back of unit is denoted SCSI ID and is... (5 Replies)
Discussion started by: davel1000
5 Replies

6. AIX

AIX Tape Drive Backup

Currently I have a Dell Ultrium LTO 2 Tape Drive. I am going to have a IBM AIX server. Just wonder if it is possibe to connect this tape drive to the aix server? I have Brightstor Arcserver installed on another win 2003 server. Is it possible to install the arcserve agent on the aix and use the... (1 Reply)
Discussion started by: ming413
1 Replies

7. Linux

linux backup to solaris tape drive

All, Has anybody ever got a Linux server to backup to a remote Solaris tape drive using the dump command and rsh? I can remtoely backup two Solaris server this way. Any help would be appreciated. Thanks, Mike (0 Replies)
Discussion started by: bubba112557
0 Replies

8. Solaris

Backup over network to remote tape drive

I am currently using tar to backup a server that has 9gb of data. This is fine and works fine, as part of this I send the backup to a remote tape on a remote server using rsh.. This is not very secure though is it? Whats the best idea here - is there another way I should do this to be more... (1 Reply)
Discussion started by: frustrated1
1 Replies

9. UNIX for Dummies Questions & Answers

Replace the tape backup drive

Please help me!!!. I am new to Unix and I have to replace the tape backup drive. Originally the system had an IBM tape drive (Rhomat) that is damged. I changed it and installed a dat drive HP 5000+. The hardware recognize the drive, the diagnostics if OK. But when I try to install the operating... (3 Replies)
Discussion started by: allaite2
3 Replies

10. Cybersecurity

Unix backup to tape drive

does anyone know how I can make an automatic backup of files to a tape drive under UNIX. I have so many commands, I don't know which goes where. I have commands for the task scheduler, Cron and other unix commands. Please help. Very Urgent. Thanks (3 Replies)
Discussion started by: Cute
3 Replies
Login or Register to Ask a Question