Day09 in Devops

How do i accomplish the below task in 100 days of Devops project.

Day09:
The production support team of xFusionCorp Industries is working on developing some bash scripts to automate different day to day tasks. One is to create a bash script for taking websites backup. They have a static website running on App Server 3 in Stratos Datacenter, and they need to create a bash script named news_backup.sh which should accomplish the following tasks. (Also remember to place the script under /scripts directory on App Server 3).

a. Create a zip archive named xfusioncorp_news.zip of /var/www/html/news directory.

b. Save the archive in /backup/ on App Server 3. This is a temporary storage, as backups from this location will be clean on weekly basis. Therefore, we also need to save this backup archive on Nautilus Backup Server.

c. Copy the created archive to Nautilus Backup Server server in /backup/ location.

d. Please make sure script won’t ask for password while copying the archive file. Additionally, the respective server user (for example, tony in case of App Server 1) must be able to run it.

e. Do not use sudo inside the script.

Note:
The zip package must be installed on given App Server before executing the script. This package is essential for creating the zip archive of the website files. Install it manually outside the script.

Hi @UsharaniS

There is a solution for this task. You can check it here: 100 Days of DevOps – Day 9

Hi Raymond,

Thanks for the reply. I’m sorry i mentioned wrong Day number. I was looking for solution to Day10.

Below is the question:
The production support team of xFusionCorp Industries is working on developing some bash scripts to automate different day to day tasks. One is to create a bash script for taking websites backup. They have a static website running on App Server 3 in Stratos Datacenter, and they need to create a bash script named news_backup.sh which should accomplish the following tasks. (Also remember to place the script under /scripts directory on App Server 3).

a. Create a zip archive named xfusioncorp_news.zip of /var/www/html/news directory.

b. Save the archive in /backup/ on App Server 3. This is a temporary storage, as backups from this location will be clean on weekly basis. Therefore, we also need to save this backup archive on Nautilus Backup Server.

c. Copy the created archive to Nautilus Backup Server server in /backup/ location.

d. Please make sure script won’t ask for password while copying the archive file. Additionally, the respective server user (for example, tony in case of App Server 1) must be able to run it.

e. Do not use sudo inside the script.

Note:
The zip package must be installed on given App Server before executing the script. This package is essential for creating the zip archive of the website files. Install it manually outside the script.

Reply

  • created

9h

  • [

last reply

](Day09 in Devops - #2 by raymond.baoly)

1h

  • 1

reply

  • 12

views

  • 2

users

  • 1

link

raymond.baoly

1h

Hi @UsharaniS

There is a solution for this task. You can check it here: 100 Days of DevOps – Day 9

SolutionReply

ShareBookmarkFlagReply

You will receive notifications because you created this topic.

Suggested Topics

DevOps

question

How do i fix this this problem|1|1d|
|I want to do combine tools for my devops project new

DevOps

Hello Everyone I want to integrate github, jenkins, docker, kubernetes, terraform, prometheus and grafana for a DevOps Project of 3 tier app How will be able to do it can anyone guide me on this?|0|1d|
|Need to connect EC2 Instance ,unable to get into the roort new

AWS|2|35m|
|100 days of azure - day 1 new

KodeKloud Engineer

hello I see this the whole time : az sshkey create --name devops-kp --resource-group DevOpsRG --encryption-type RSA (AuthorizationFailed) The client ‘kk_lab_user_main-8bdeeba40f9c472d@azurefreekmlprod.onmicrosoft.com’ … read more|1|41m|
|CKAD exam preparation - Simulation exam vs real exam new

Kubernetes

ckad

Hi guys, I am preparing my self for the CKAD exam. I took Mumshad course and I also took the CKAD simulation course on the KodeKloud portal. my question is: is real exam similar to this simulation exam? what should I… read more|1|1h|

There are 16 new topics remaining, or browse other topics in DevOps

Please try this solution instead for Day 10