Can someone show me where I go wrong from my solution?
+The Task content:
Production support team of xFusionCorp Industries is working on developing some bash scripts to automate different day to day tasks. One of them is to create a bash script for taking websites backup. They have a static website running on App Server 1 in Stratos Datacenter. They need to create a bash script named ecommerce_backup.sh which should accomplish below given tasks. (Also remember to place the script under /scripts directory on App Server 1)
a. Create a zip archive named xfusioncorp_ecommerce.zip of /var/www/html/ecommerce directory.
b. Save the archive in /backup/ on App Server 1. This is a temporary storage as backups from this location will be clean on weekly basis so 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 coping the archive file also respective server user (for example tony in case of App Server 1) must be able to run it.
ssh clint@stbkp01 => this works without asking for password
2. Create scripts
zip -r /scripts/xfusioncorp_ecommerce.zip /var/www/html/ecommerce
mv /scripts/xfusioncorp_ecommerce.zip /backup/
scp /backup/xfusioncorp_ecommerce.zip clint@stbkp01:/backup/
chmod +x /scripts/ecommerce_backup.sh
3. Verify
sh /scripts/ecommerce_backup.sh
@Inderpreet or @mmumshad I would appreciate someone else correct this result. @Salim your answer is not correct, the names are changed after each attempt. The screen shot indicate that I used the correct name. The screen shot also showed that I verify the file was copied and present before I submit my results. ecommerce.zip was not assigned in my task.
Also, this is a task that I had completed multiple times when the system was having problem a few days ago.
I did the task Linux backup scripts but it failed. It did test it before submitting and it did work fine(without asking for password). Can you please check where it went wrong.
Task Desription:
Production support team of xFusionCorp Industries is working on developing some bash scripts to automate different day to day tasks. One of them is to create a bash script for taking websites backup. They have a static website running on App Server 3 in Stratos Datacenter. They need to create a bash script named media_backup.sh which should accomplish below given tasks. (Also remember to place the script under /scripts directory on App Server 3)
a. Create a zip archive named xfusioncorp_media.zip of /var/www/html/media 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 so 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 coping the archive file also respective server user (for example tony in case of App Server 1) must be able to run it.
Hi guys, @Joe@kahntran
I think you should do sudo scp /backup/xfusioncorp_commerce.zip clint@stbkp0:/backup/xfusioncorp_commerce.zip rather than scp /backup/xfusioncorp_commerce.zip clint@stbkp0:/backup/
It will work only one time when system will boot up again if you run this script with sudo privilege it will ask the password so script is not configured according for that. That’s why task marked as failed. Avoid to use sudo or if adding then make it according for it.