here in the 10th day tasks for 100 days of DevOps, even if I gave the correct commands, it says - ‘xfusioncorp_news.zip’ not found under ‘/backup’ on Backup Server.
in my previous code, after logged into the App server 3, I tried the code as a sudo user
sudo su -
now I have tried without sudo su -, it works
Thanks anyway
Nope the safest way is because in our description the Kodecloud given ‘xfusioncorp_official.zip’ named but they checked in the BackUp server with this named ‘xfusioncorp_news.zip’. So the safest way is zip with both names and scp to Backup server with both names
ssh banner@stapp03
sudo yum install -y zip
vi /scripts/official_backup.sh
-----insert the below line in our script file
#!/bin/bash
zip -r /backup/xfusioncorp_official.zip /var/www/html/official
zip -r /backup/xfusioncorp_news.zip /var/www/html/official