Cyber Deals - Get up to 65% off on CKA, CKAD, CKS, KCNA, KCSA exams and courses!

vCSA Automated Backup

vCSA Automated Backup
Image : forbesconrad.com
vCenter 6.5 backup using cron job
We all know that vCenter appliance can be backed up using its GUI window to any external servers or storage that supports FTP, SCP or HTTPS ports. However this is always a one time job. What if you built your virtual environment on Jan 1st 2019 and had made lots of changes but not taken a single backup if needed to restore at some point? You will not have latest backup or no backup at all!! All you did is considered lost if a single mistake happened that can cause huge damage.

It’s always good to have an automated backup to a safe place which can later use for restore if needed. Not to worry too much, Vmware provides you a bash script that can do this job for you. It’s a basic script, you need to modify the script as you needed. Script can be found here .

This script do not encrypt backup that takes. All you need a Linux server, with a local user name, password, an empty folder or file system with empty folder where it can store the backup it dumps and make sure the user name has password that never expire.

Unfortunately the script or vCSA backup do not SFTP protocol. If your environment has security concerns, its your job to make the script more secured. This is because, if you need a local account with never expired password, some customer will request to deny that user for interactive logon. Which means, user shouldn’t be able to login using SSH command, but allowed to su to that user from other user, if you know password. However vCSA backup do not support SFTP protocol, we cannot make the user as non-interactive logon. SCP option requires the user to be logged in the shell. Besides the script has plain text of your passwords of vCenter admin user as well as this backup job user. So make sure to keep the script in secured location with restricted access.

You may adjust the script to choose your protocol as needed.

Issues

We encountered an issue which never tell you where exactly the problem. After we successfully set-up the script with SCP protocol, first job encountered following error:

“{“type”:”com.vmware.vapi.std.errors.unauthenticated”,”value”:{“messages”:[{“args”:[],”default_message”:”Unable  to authenticate user”,”id”:”vapi.security.authentication.invalid”}]}}”

For further investigation you can check the vCenter log file, tailf -f /var/log/vmware/vapi/endpoint/endpoint.log , after you SSH to the vCenter as root user. Unfortunately you will not understand much unless you are an expert on this.

After several research, found a fix as recommended in this article. Now we have no issues and the job scheduled via cron and it takes backup every weekend.

Shibin John

Shibin John

Project Technical Lead at DXC Technology


Disclaimer: Views expressed in articles are those of the respective authors and do not necessarily reflect the views of their employers or this site. While we aim for accuracy, please verify information before relying on it, and let us know if you spot an error.
Share:

Related Posts

How to delete a pod with Terminating state in OpenShift or Kubernetes Cluster

How to delete a pod with Terminating state in OpenShift or Kubernetes Cluster

There might be situations where you have already deleted pods (or already removed dc aka deployment configuration) but pods are stuck in Terminating …

Sending Email Using Python and smtplib – Quick HowTo

Sending Email Using Python and smtplib – Quick HowTo

What is smtpLib We can easily send email from python script using smtplib module, which defines an SMTP client session object that can be used...

OpenShift Container Platform 3.11 Installation Documents

OpenShift Container Platform 3.11 Installation Documents

Since OCP 3.11 is available now, you may refer below documents for OpenShift Container Platform 3.11 Installation on different infrastructure or …

Learn the basics of Linux from Red Hat [FREE]

Learn the basics of Linux from Red Hat [FREE]

Red Hat is offering its beginner level Linux course at no-cost; yes you heard it right – Its free ! Red Hat Enterprise Linux Technical...

Google Cloud Global Digital Conference – Jan 24

Google Cloud Global Digital Conference – Jan 24

Google Cloud is arranging Global Digital Conference on 24th January 2019. Agenda has two tracks : Serverless – Build and ship applications faster – …

SSSD AD integration on RHEL7 using Ansible

SSSD AD integration on RHEL7 using Ansible

Most of the time , we have requirement to integrate Linux systems in our environment with AD for Centralized user management. It will be tedious...