Translate

Tuesday, 26 November 2013

Backing-up your VIOS server

The easiest way to backup your VIOS servers is to create an NFS mount-point on another machine and then mount it. e.g.

1. Create a new directory/mount-point:

# mkdir /backups
# chmod 0777 /backups

2. Create a public-share in "/etc/exports". (Note this is a quick and dirty method without security)

# cat > /etc/exports
/fixes -public,sec=sys:krb5p:krb5i:krb5:dh,rw

3. Export the filesystem

# exportfs -a
# lsnfsexp
/fixes -public,sec=sys:krb5p:krb5i:krb5:dh,rw

4. Login to your VIOS server as "padmin" and switch to root (You have to do that as “root” because “padmin” uses a restricted shell).

$ oem_setup_env
# mount server:/backups /mnt
# ^d

5. Start the backup. This example does not backup the media-library for quickness, and to save space, however there are many options available:

backupios -file {Directory} [-nosvg][-nomedialib]
       backupios -file {Filename} [-mksysb][-nopak][-nosvg][-nomedialib]
       backupios -tape Device [-blocks Number] [-nopak] [-verify] [-nosvg][-nomedialib]
       backupios -cd Device {-udf | -cdformat} [-accept] [-nosvg][-nomedialib]

$ backupios -file /mnt/backupios.mksysb -mksysb -nomedialib

Creating /mnt/backupios.mksysb
Backup in progress.  This command can take a considerable amount of time
to complete, please be patient...

Creating information file (/image.data) for rootvg.

Creating list of files to back up.

Backing up 107493 files.....................

107493 of 107493 files (100%)
0512-038 savevg: Backup Completed Successfully.

6. Once the backup has completed switch back to root and un-mount "/mnt"

$ oem_setup_env
# umount /mnt

7. Login to the backup server host and check the backup file as follows:

# lsmksysb -sf ./backupios.mksysb | head
New volume on ./imx02.backupios:
Cluster size is 51200 bytes (100 blocks).
The volume number is 1.
The backup date is: Tue Nov 26 08:46:01 CET 2013
Files are backed up by name.
The user is root.
        5576 ./bosinst.data
          11 ./tmp/vgdata/rootvg/image.info
       12736 ./image.data
      316958 ./tmp/vgdata/rootvg/backup.data
           0 ./usr
           0 ./usr/X11R6
          19 ./usr/X11R6/lib
           8 ./usr/adm
           0 ./usr/aix
           0 ./usr/aix/bin





No comments:

Post a Comment