Back-up is not important!

As a system administrator who have a system or server that needs to run all the time, we need to have a backup at least once a week. This backup can be in file level, such as rsnapshot in Linux. Or can be VM level backup such as the vzdump in the Proxmox environment.

The backup always comes handy if something goes wrong in the current production environments. Let say, costumer accidentally delete the Nginx configuration. We can restore from the rsnapshot daily backup. Or, VM accidentally destroyed from hypervisor Proxmox. We can restore it from the vzdump backup.

But, sometimes users or customers does not fully aware or even notice the importance of the backup. Usually, they become angry and reactive when the issues happen even though we have offered the backup solution when the project started.

If we look closely, it’s true that the backup actually not important. Why? it’s is obvious that when everything is okay this backup only a junk of file without purpose. This especially happens with sensitive budget type customers or users. I also can relate to this point of view.

By stating “Backup Is not Important”, what I am trying to say is that backup is only a bunch of files unless you can make sure that the file is usable or able to perform as the initial state when the restore procedure is done. So it is important to make sure that you have at least procedure to test restoring your backup files and make sure that the system is working as intended.

Migrate your Linux Server using Rsync

Sometimes we need to move our server to another. Either it’s from on-prem to cloud, vm to vm, or to vps. While migrating we want minimum downtime as we can to the service or systems. Usually, i use rsync to migrate the data and even the OS, so we don’t need to reconfigure the server on the new DC or environment.

To perform that you need to;

  1. Make sure you set up the target VM/server the same as the source.
  2. Setup ssh keyless for root either from or to the target server. You can use rsync to push or pull the data from or to the servers.
  3. Perform rsync dryrun to test your migration. Also, make sure to exclude the specific configuration for the host to avoid conflict or error when you transfer the data. Example;
    rsync -aHAXPn –numeric-ids –exclude={“/boot/*”,”/etc/default/grub”,”/etc/fstab”,”/etc/lvm/*”,”/etc/udev/*”,”/etc/ssh/*”,”/etc/network/interfaces”,”/root/.ssh/*”,”/etc/hostname”,”/etc/hosts”,”/dev/*”,”/proc/*”,”/sys/*”,”/tmp/*”,”/run/*”,”/mnt/*”,”/media/*”,”/lost+found”} old.hostname:/ /
    -n : dry-run
    -another option : please reffer to manual 😛
    * You need to adjust the excluded files based on your OS distribution
    * In this case, we pull the data from the old server to new server.
  4. Perform the initial sync by removing the “-n” from the command above.
  5. For final migration, stop all service on the source server to keep data consistency and avoid data corruption. Then perform step number 4 again.
  6. Now you can try to restart your VM in the new environment or DC. The server supposed to boot normally unless you’ve done something wrong.

Hope this helps you.
Thank You.

My MegaRaid CheatSheat

This is my most used MegaRaid command collection.

A fast command to diagnose the array health status;
MegaCli64 -pdList -a0 | grep -i -E “enclosure|slot|RAW Size|device id|pd type|firmware state|inquiry data”

List the phisical disk;
MegaCli64 -pdList -a0 | grep -i -E “slot|RAW Size|pd type”

List logical drive;
MegaCli64 -LDInfo -Lall -aALL

Locate and blinking your disk in the controler
Start blinking
MegaCli64 -PdLocate -start -physdrv[<ENCLOSURE>:<DRIVE>] -a0
Stop blinking
MegaCli64 -PdLocate -stop -physdrv[<ENCLOSURE><DRIVE>] -a0

To be Continue..

Financial Aid In Coursera

After passing the Google ACE (Associate Cloud Engineer), I want to continue to learn for the next certification in Google Cloud expert path.

The next path is Google PCA (Professional Cloud Architect). This exam will cover about design, manage and provisioning, analyze/optimize technical/business process and ensures reliability of the selution.

Based on the information from google’s official site about the certification, here. Then I am trying to find learning/reading sources about the exam and all materials on the internet. From searching ebook’s, pdf’s, and cheap/discount learning sites like Udemy, etc.
Finally, I found the in the Coursera itself where I have the ACE last time. They provide financial aid for the course. Basically like a scholarship in your regular school.

To get or accepted in Coursera program’s, you only need to create an essay the reason why you need financial aid for your course. Minimum 300 words, and if you are lucky you will get the acceptance reply in 17 days.

Passing LFCS Exam

On November 28 I am taking the Linux Foundation Certified Linux System administrator exam for the second time. The first one is failed with only 47% point form 66% required to pass. This is a late exam actually, I bought this form cyber Monday discount last year. Fortunately, on the free retake, I am able to pass with an 85% point.
The first take feels like taking a grasp of what all of the performance-based on hands exam looks like. This exam is performed online with a proctor. All the activity during the exam is recorded and shared via the sharing screen by the examschool.local plugin installed as mandatory to take the exam. You will not allow covering your mouth, mouthing, and any suspicious activity during the exam. You are allowed to bring water with a clear glass cup. The exam time is 2 hours with 24 tasks. You can take a break to the restroom but the time will continue to roll.

On this exam the task is structured as:

  • Essential Commands – 25%
  • Operation of Running Systems – 20%
  • User and Group Management – 10%
  • Networking – 12%
  • Service Configuration – 20%
  • Storage Management – 13%

You will instruct to use command for user management, password, permission, access lists, changing the hostname, create lvm, software raid using mdadm, partitioning and grep some content or find files with certain criteria.

All the task is related to a daily administrative task. All the tasks can be achieved by using the manual of the command. I am using apropos to search the keyword for related command to find their man.

Pass the Google ACE Exam

https://googlecloudcertified.credential.net/?name=Asrar

This month, I have completed the Google Associate Cloud Engineer Exam Certification. this certification is sponsored by the ministry of ICT Indonesia on their Digital Talent Scholarships. There is another topic in the Online Academy category also with certification such us AWS Cloud Associate, Python, Bigdata, CCNA Cybersecurity Operations, etc. There are more category in their site https://digitalent.kominfo.go.id/

Google ace

For the Google Associate Cloud Engineer Online, the academy is facilitated through Coursera for the corse. This course is a track course with a specialization “Architecting using Google Compute Engine”.
This specialization introduces learners to the comprehensive and flexible infrastructure and platform services provided by Google Cloud Platform, with a focus on Compute Engine. Through a combination of presentations, demos, and hands-on labs, participants explore and deploy solution elements, including infrastructure components such as networks, systems and applications services. This course also covers deploying practical solutions including securely interconnecting networks, customer-supplied encryption keys, security and access management, quotas and billing, and resource monitoring. For the hands-on lab, Coursera provides access to Qwicklabs to enhance the experience in the related materials.

This class is intended for Cloud Solutions Architects, DevOps Engineers or individuals using Compute Engine

Google Associate certification is a job-task based certification focused on core Google Cloud Platform technology. This certification is a good starting point for those new to the cloud or new to GCP and can be used as a path to professional level certifications.

The exam is about 2 hours with 50 questions mostly multiple choice. in my session, most of the question is about IAM or Identity and Access Management with a few Kubernetes, billing, storage, cloud spanner and big querry question.
This is the sum up of my test that may help you pass the exam;

  • IAM Role
  • GCloud Syntax
  • GCP hierarchy, correlation domain to project to a folder and the resource
  • Google Storage
  • BigQuerry
  • Deployment
  • GCP Networking
  • GCP Computer engine
  • GCP Product limitation
  • and some Kubernetes (GKE)

Good luck with your exam.