Operating System - HP-UX
1753774 Members
6928 Online
108799 Solutions
New Discussion юеВ

how to perform backup using SAM

 
SOLVED
Go to solution
FaizirizaL
Frequent Advisor

how to perform backup using SAM

Can anyone explain to me on how to perform backup using SAM? now i need to backup from /var to /backups (refer to below)

Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 311296 275920 35208 89% /
/dev/vg00/lvol1 298928 56264 212768 21% /stand
/dev/vg00/lvol8 4194304 2010696 2167616 48% /var
/dev/vg00/lvol7 1548288 1017120 527048 66% /usr
/dev/vg00/lvol4 524288 293968 228584 56% /tmp
/dev/vg00/lvol6 1548288 1458264 89360 94% /opt
/dev/vg00/lvol5 106496 4024 101704 4% /home
/dev/vg04/lvol1 20480000 10260528 10075376 50% /appl
/dev/vg04/lvol2 516096 1229 482695 0% /scripts
/dev/vg04/lvol3 10240000 386558 9545554 4% /backup

thnk you..regards,
7 REPLIES 7
Peter Godron
Honored Contributor

Re: how to perform backup using SAM

Hi,
you would probably be better off doing a copy
with the -R option
Just be aware of open files on /var
see
man cp


Also:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28

Prasanth B
Trusted Contributor

Re: how to perform backup using SAM

Hi,

You can do it easily from command line using cpio. do the follwoing

cd /var
find . -depth -print|cpio -pdlmvu /backup

The command abovecopies everything including symbolic links

-PB
Take life as it comes
Jaime Bolanos Rojas.
Honored Contributor

Re: how to perform backup using SAM

Faizirizal,

The thing is if go to sam ----> backup and recovery ----> Interactive backup and recovery ----> then it will look for backup device, but you want to backup to another directory and SAM does not give you this flexibility.

Please follow the advice posted before, also you can use fbackup to do the job.

Regards,

Jaime.
Work hard when the need comes out.
Bill Hassell
Honored Contributor

Re: how to perform backup using SAM

If mby 'backup' you mean: copy everything in /var to /backup, then the cpio method mentioned above is the fastest way. SAM does not have a copy feature. If you mean that you want to backup the files in /var and /backups onto a tape, then SAM will do this for you.


Bill Hassell, sysadmin
FaizirizaL
Frequent Advisor

Re: how to perform backup using SAM

thnk you all for the solutions,

for this case i think ill try cpio that mentioned. Actually, im trying to perform housekeeping on /var and make the /backup as a temporary destination for the backup job.what do you think if i use sam>>routine task>>log>>trim to recommended size for the /var? What happen if i do it when other user connected?

Jim Purtell
Frequent Advisor

Re: how to perform backup using SAM

FaizirizaL,
I've writen a few scipts to accomplish just what you're trying to do. I say, "why re-invent the wheel if you don't have to".

Please find the attached script and graph file.
Update the script entries . . .

export _WD=/DR/shell # Change
export _DR=/DR # Change
export _list=$_WD/$(basename $0).list # Change - Graph file to update to include or exclude files/ directories

As well as the graph file 'daily_dr.sh.list' . . .

# i=include e=exclude a=all f=file
i f / .profile .sh_history
i a /etc/lp
i a /sbin/rc0.d
i a /sbin/rc1.d
i a /sbin/rc2.d
i a /sbin/rc3.d
i a /sbin/rc4.d
i a /etc/mail
i a /etc/lvmconf
i a /etc/rc.config.d
i a /etc/ftpd
i f /etc/ fstab group hosts inetd.conf inittab lvmpvg lvmtab nsswitch.conf ntp.conf pam.conf pam_user.conf passwd resolv.conf services syslog.conf

I hope this comes accros okay. If it dosn't let me know.

Regards,
Jim
Bill Hassell
Honored Contributor
Solution

Re: how to perform backup using SAM

You don't need to copy all of /var to another disk just to fix space problems. You do need to find where the big space is located (not big files) in directories. Type this:

du -kx /var | sort -rn | head -20

This will show you the biggest directories, sorted largest first. If /var/adm is at the top of the list, use SAM to trim the logfiles. The standard values will work fine and trimming can be done while the system is busy.

If there are other directories that are very large, please paste a copy of the above command output and we can suggest what you can do next.


Bill Hassell, sysadmin