We moved this page to our Documentation Portal. You can find the latest updates here. |
Question
How can I recover files from a backup server?
Environment
CentOS 64bit
Answer
This article presumes availability of off-server/site backups of the following directories, so that the files of those directories could be copied back to the server being recovered:
- /onapp/backups
- /onapp/templates
- /root
- /etc/iscsi/initiatorname.iscsi
To recover a backup server:
-
Prepare the following:
-
Install a clean installation of CentOS 64bit
-
Configure networking to match the previous configuration
-
Ensure you can ping compute resources and Control Panel over the management and backup networks
-
-
Update CentOS components to the latest yum update.
-
Download and install OnApp YUM repository file:
rpm -Uvh http://rpm.repo.onapp.com/repo/onapp-repo.noarch.rpm
-
Install OnApp Backup Server installer package. Please, reboot if requested by the installer due to SELINUX, and then continue:
#> yum install -y onapp-bk-install
-
Run the Backup Server installer to install the latest OnApp release:
/onapp/onapp-bk-install/onapp-bk-install.sh
If required, indicate the build number of the release version you want to install:
/onapp/onapp-bk-install/onapp-bk-install.sh -v <ONAPP_VERSION>
-
Run the Backup Server configuration script to register it with controller:
#>/onapp/onapp-bk-install/onapp-bk-config.sh -h <CP_HOST_IP> -p [BK_HOST_IP] -f <FILE_TRANSFER_SERVER_IP>
Where:- CP_HOST_IP- is the IP address of the Control Panel server
-
BK_HOST_IP - is the IP address of the Backup Server
-
FILE_TRANSFER_SERVER_IP - is the IP address of the server that will hold your backups and templates
-
To ensure the SSH keys are correct, import the following from the backup:
/root/.ssh/authorized_keys /root/.ssh/id_rsa /root/.ssh/id_rsa.pub
Make sure you can access the backup server via SSH from the controller and the hypervisors. You should be able to connect through SSH as am OnApp user if the keys are working correctly.
ssh root@<BK_IP_ADDRESS>
-
Restore backup and template files to the new installation:
/onapp/backups /onapp/templates
Basing on server configurations it’s possible that a separate block device is being used for backups. If so, this block device needs to be mounted under /onapp and all files transferred over to the block. If the /onapp/backups directory does not exist it can be created at this time.
-
Restore primary storage targets on the server.
The primary storage targets need to be mounted on the backup server.
If the environment is using iSCSI this can be done using the following commands:Restore the /etc/iscsi/initiatorname.iscsi #> iscsiadmin -m discovery -t sendtargets -p [SAN IP] #> iscsiadmin -m node -l
-
If the environment has FC/FCoE directly attached, you will need to ensure the block devices are visible and multipath is enabled
#> service multipathd start #> multipath -ll
Once this is complete you can run the pvs command. You should see the primary storage targets, their identifiers will be in the following format: onapp- xxxxxxxxxxx.
- Ensure root access is available via SSH
If the PermitRootLogin in the /etc/ssh/sshd_config is set to no, change it to yes to allow access to the backup server from the controller.
-
Restart services for changes to take effect:
service onapp stop service onapp start