Sponsored Content
Full Discussion: Backup and restore
Operating Systems AIX Backup and restore Post 302563856 by rbatte1 on Wednesday 12th of October 2011 09:51:28 AM
Old 10-12-2011
Smilie Smilie Smilie Eeeek! Smilie Smilie Smilie - You are leaving yourself at risk with this process.

Might I make a suggestion the you (as root) create an empty directory /disaster and a file /etc/exclude.datavg containing just ^\./ It is a circumflex/hat/funny accent to define beggining of line, then a backslash, fullstop then a forward slash. No trailling spaces. When savevg runs with the -e flag, it will use this file to exclude the contents of the datavg filesystems. Then:-
Code:
mkszfile
savevg -ef /disaster/datavg.structure datavg                  # Save mirrored definition
echo ":%s /COPIES= 2/COPIES= 1\n:wq"|vi /tmp/vgdata/datavg/datavg.data
savevg -ef /disaster/datavg.structure_nomirror datavg         # Save un-mirrored definition

mksysb /dev/rmt0                                              # Backup for recovery to mirrored rootvg disks 
echo ":%s /COPIES= 2/COPIES= 1\n:wq"|vi /image.data
mksysb /dev/rmt0                                              # Backup for recovery single rootvg disk

Now you will notice that there are savevg commands here. These save the definition of your volume group (logical volumes, filesystems etc.) but no data. The files created will be recovered when you restore your mksysb so you have a starting point. You can then issue:-
Code:
restvg -q -f /disaster/datavg.structure hdisk2 hdisk3

on your live server, or
Code:
restvg -q -f /disaster/datavg.structure_nomirror hdisk1

on the DR server. This will recreate and mount the empty filesystems ready ready for a data restore. Obviously, the disks have to be empty and not part of a volume group to do this, so it is probably only theoretical for your live server. Don't use it unless you have to Smilie

Now obviously you have to consider the data backup/restore process. In my experience, savevg is not the neatest because (I think) you have to restore the whole volume group and that could be a problem if you are just after a single file. Use tar, cpio, or backup & restore to save your data. You can also then split it up over different media and be confident that you can restore single files if required.

You could do the following to get the filesystems you need to backup with tar/cpio etc.:-
Code:
lsvg -l datavg |grep open |tr -s " " |cut -f7 -d " " |sort

The rest is up to you really on how you want to play it. I would not necessarily advise avoiding smit completely, more trying to learn what it is doing for you and scripting that up instead. Have a look at smit.script that grows with each command. It will give you a better understanding of what you are asking the server to do.


It should at least reduce the risk to your server during the backup window. Additionally, smit panels are pretty difficult to schedule, so you could end up either staying on-site after business hours (including any schedule) to press the buttons and set it off or risk taking a backup of a moving target.

Does this help?


I think that your description suggests that your data is on plain unmirrored disks. Is that correct? If so then you are at risk there too. Smilie Smilie Smilie I regret that it is probably time to spend some money to protect yourself from a disk failure. If not, can you post the output from:-
Code:
lsvg -p datavg
lsvg -l datavg

... so we can see what can be done.


Can anyone else tidy up my procedure, suggest more information (correct any errors too) or help fill this out to better secure the position of this server?




Robin
Liverpool/Blackburn
UK
This User Gave Thanks to rbatte1 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cannot restore a TAR backup

I backed up a unix database using "tar -cvf /dev/rmt1 -N 800 /*" Normally I would restore this using "tar -xvf /dev/rmt1 -N 800" This is reporting an error about "not enough memory" I have done a new test backup and restore using the same commands and they work. ANY IDEAS ? (2 Replies)
Discussion started by: Ross.Goodman
2 Replies

2. Solaris

Backup / restore

Hi.... everyone could help me to understand how to do a backup of my servers .. operating systems is sun solaris 8 . I have some question about .... 1) Is better backup phisical disk or partition ??? i sow the command is ufsdump 0cfu /expbck/bcksunver/c0t0d0s5 dev/dsk/c0t0d0s5 to... (4 Replies)
Discussion started by: tt155
4 Replies

3. AIX

Backup and restore

I have several H80 machines, all with AIX 4.3.3. On these machines I have mksysb running for rootvg backups and savevg for non-rootvg backups. I'm trying to get a list of files on the tapes, but I can't seem to do it with tar for the mksysb images. I keep getting the directory checksum errors?... (3 Replies)
Discussion started by: uXion
3 Replies

4. HP-UX

F-Backup restore

Hello! i have a blank harddrive and a complete tape backup of the workstation. the backup is made with F-Backup. Now my question is: how can i restore my workstation? thanks for every idea! paul tittel hup-si (3 Replies)
Discussion started by: paultittel
3 Replies

5. AIX

How to restore from mksysb backup

system is not booting ... i want to restore from mksysb backup. (2 Replies)
Discussion started by: AIXlearner
2 Replies

6. Shell Programming and Scripting

Backup/restore scripts

hi people i am in need of some assistance here hoping to star a linux course in january to wanted to get some experiance before starting so got a hold of some old assessments from a mate at college so just working through them in my spare time for the past 8 weeks or so and this is the final ? that... (2 Replies)
Discussion started by: boabbyrab
2 Replies

7. Shell Programming and Scripting

Backup and restore in unix

Hello everybody, i am trying to make a script in UNIX to backup some compressed files to a tape drive. The thing is that i cannot use cpio command because some of these files are greater than 2GB. so i think the only solution left is backup command. to restore the files i should use the... (6 Replies)
Discussion started by: omonoiatis9
6 Replies

8. Solaris

Zpool backup and restore

hi, my requirement goes something like this: In current setup, we have SPARC server running Solaris10 5/08. Out of 3 HDD available, 2 HDD (other than root) were zpool-ed and 3 zones were created. Now, we have bought a new server with similar H/W config and planning to move the zones... (1 Reply)
Discussion started by: EmbedUX
1 Replies

9. Red Hat

Backup / Restore

Hi, I need to back up a RH file system (96G). The files are oracle .dbf format some of which are 5G in size. I know that tar has got a size restriction of 2G so I cannot use this. Can anyone recommend an alternative way of backuping up this FS? I have been looking at dump but this... (6 Replies)
Discussion started by: Duffs22
6 Replies

10. AIX

Backup and restore query

I have some old directories and files that I which to archive off. I have created archive using -p option with /usr/sbin/backup to a file. If I then do a du -g on the original directory and the archive differ as I'd expect due to using the p flag to compress the files < 2gb as part of the backup. ... (1 Reply)
Discussion started by: gefa
1 Replies
All times are GMT -4. The time now is 07:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy