Introduction
This document describes how to take a backup from Prime Infrastructure (PI) Gen 1 Appliance externally with the use of a USB port of Appliance and vice-versa.
Problem
In many customer scenarios, the use of File Trasfer Protocol/ Trivial File Transfer Protocol (FTP/TFTP) is restricted in their data centre and hence it is a big challenge for the customer to move the backup from PI to an external point with the help of any FTP/TFTP server. Since Appliance is a Linux based Server, it is very difficult to move backup from any other way to the external point because there could be a possibility for it to corrupt the backup at the time of improper transfer.
Solution
In order to overcome this situation, find an alternate solution to move the backup from Prime Server to USB Stick with the use of USB port of appliance. Another advantage is that it is much faster and helps reduce the time that it takes to copy by FTP/TFTP/SFTP and it will be very helpful to copy large data as well.
Backup from PI Gen1 Appliance to USB
Step 1. Insert a USB stick.
Step 2. Create a new partition supported ext4 file system.
-bash-4.1# fdisk -l n e l t 8e w
-bash-4.1# partprobe
-bash-4.1# mkfs.ext4 /dev/sdb1
-bash-4.1# mkdir /media/usb-drive/
-bash-4.1# mount -t ext4 /dev/sdb1 /media/usb-drive/
-bash-4.1# umount /media/usb-drive
Step 3. Copy the backup from defaultRepo to the newly mounted file system.
Step 4. Validate the md5 of the file in both the places.
Backup from USB to PI Gen1 Appliance
Step 1. Login into the PI.
pi/admin#
Step 2. Navigate to shell.
pi/admin# shell
Enter shell access password :
Starting bash shell ...
ade #
ade #
ade # sudo su -
-bash-4.1#
Step 3. View all Disk Partitions in PI.
-bash-4.1# fdisk -l
Disk /dev/sda: 897.0 GB, 896998047744 bytes
255 heads, 63 sectors/track, 109053 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000591be
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 77 102400 83 Linux
Partition 2 does not end on cylinder boundary.
/dev/sda3 77 109054 875359232 8e Linux LVM
Disk /dev/mapper/smosvg-rootvol: 4194 MB, 4194304000 bytes
255 heads, 63 sectors/track, 509 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-swapvol: 16.8 GB, 16777216000 bytes
255 heads, 63 sectors/track, 2039 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-tmpvol: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-usrvol: 7348 MB, 7348420608 bytes
255 heads, 63 sectors/track, 893 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-varvol: 4194 MB, 4194304000 bytes
255 heads, 63 sectors/track, 509 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-optvol: 716.3 GB, 716252905472 bytes
255 heads, 63 sectors/track, 87079 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-home: 134 MB, 134217728 bytes
255 heads, 63 sectors/track, 16 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-recvol: 134 MB, 134217728 bytes
255 heads, 63 sectors/track, 16 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-altrootvol: 134 MB, 134217728 bytes
255 heads, 63 sectors/track, 16 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-localdiskvol: 134.6 GB, 134553272320 bytes
255 heads, 63 sectors/track, 16358 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-storeddatavol: 10.5 GB, 10502537216 bytes
255 heads, 63 sectors/track, 1276 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdb: 62.1 GB, 62075699200 bytes
255 heads, 63 sectors/track, 7546 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa5fe72c5
Device Boot Start End Blocks Id System
/dev/sdb1 1 7546 60613213+ 8e Linux LVM
Step 4. Create a new directory and mount it.
-bash-4.1# mkdir /media/usb-drive/
-bash-4.1# mount -t ext4 /dev/sdb1 /media/usb-drive/
-bash-4.1# ls -lv
total 60
-rw-------. 1 root root 8494 Aug 24 2018 anaconda-ks.cfg
drwxr-xr-x. 2 root root 4096 Aug 24 2018 bin
-rw-r--r--. 1 root root 18977 Aug 24 2018 install.log
-rw-r--r--. 1 root root 5646 Aug 24 2018 install.log.syslog
-rw-r--r--. 1 root root 5 Aug 24 2018 iso.ks.cfg
-rw-------. 1 root root 164 Aug 24 2018 ks-post.log
-rw-------. 1 root root 381 Aug 24 2018 ks-post-toinstall.log
-rw-rw-r--. 1 root root 120 Aug 23 17:47 test.log
-bash-4.1# cd /media/usb-drive/
-bash-4.1# pwd
/media/usb-drive
Step 5. Before you copy the backup, check the md5 of backup from USB.
-bash-4.1# ls -lv
total 21197320
-rw-r--r--. 1 root root 21706033973 Jun 28 14:57 pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg
drwx------. 2 root root 16384 Jun 28 14:29 lost+found
-bash-4.1#
-bash-4.1#
-bash-4.1# md5sum pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg
44daa932e7ca10fafe480302f7a17b6a pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg
-bash-4.1#
-bash-4.1#
Step 6. Copy the backup in /localdisk/defaultRepo folder.
-bash-4.1# cp pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg /localdisk/defaultRepo/
-bash-4.1#
-bash-4.1#
-bash-4.1# cd /localdisk/defaultRepo/
-bash-4.1# ls -lv
total 21218032
-rw-r--r--. 1 root root 21706033973 Aug 23 18:56 pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg
-bash-4.1#
-bash-4.1#
Step 7. Verify the md5 of copied backup with previous md5.
-bash-4.1# md5sum pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg
44daa932e7ca10fafe480302f7a17b6a pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg
-bash-4.1#
-bash-4.1#
Step 8. Unmount the directory.
-bash-4.1# umount /media/usb-drive
-bash-4.1#
-bash-4.1#
-bash-4.1#