Hi,
After verification of what the task required, I don’t know really what is wrong with my script
1 i set up zip package
2 ssh-keygen
3 ssh-cpy-id clint@stbkp01
4 create a bash script in /scripts/new_backup.sh which contains two cmds first one to zip an archive and save it in /backup the second one run a scp command to copy that zip archive in stbkp01:/backup
In the future, it would really help others to determine what you got wrong by including the official task description in your screenshot.
With that said, your description of the task refers to “/scripts/new_backup.sh” while your screenshot contains “/scripts/news_backup.sh”, so I’d have to assume that you named your script incorrectly and that the task validation was looking for “/scripts/new_backup.sh” and didn’t find it…
@peterwhite surely i will do it next time, about the task, according to the task failure message, the archive zip file is not present in backup server stbkp01 that what i checked it twice, and the picture attached mentioned it, also it is not a matter of wrong script name i just wrote it without “s” in the description above.
thanks
What command(s) did you use to create the “archive zip file”? I’m wondering what type of “archive” the instructions might have indicated. e.g. Were you supposed to create a tar archive and then zip the archive file? The task certainly would fail, even with a matching file name, if the validation steps unzipped the file and expected that to result in a tar archive instead of the individual files that were zipped…
the questions were in that form
a- create a zip archive named xfusioncorp_news.zip of /var/www/html/news
b- save that file in /backup/ on app server 3
c- copy the created file to Backup server in /backup/
d- make sure that script won’t ask for password while copying the file.
for the Q-a and Q-b i set up zip unzip package, nothing mentioned about tar command, so i add the cmd below to my script:
zip -r /backup/xfusioncorp_news.zip /var/www/html/news
that command permit to create and save the zip file in /backup
for the Q-c Q-d, i run the cmds bellow:
1- ssh-keygen
2- ssh-cpy-id clint@st…
3- then i add that cmd line to my script scp -r /backup/xfusioncorp_news.zip clint@stbkp01:/backup/
the script executed with success, finnaly i checked out the output files which are located on there original path /back in stapp03 and /back in stbkp01.
hello
your line q-a should also be in your script you had to create zip file through script not separately
bot of your lines Q-a & Q-3 should have been in script
yes, i already dit that, after reviewing, i think that i needed to copy keyid to stbkp01 from banner user not from root, therefore avoiding script asks for password while copying backup to stbkp
using theses two commands will allow to you, to create your own script under /scripts/name-of-your-script.sh
any script should begin by #!/bin/bash and remenber thats cmds will run from the top first sd 3th …etc
furthermore, to make the script run without asking for password of clint user user in the second cmd, we need to generate a key and copy that key on stbkp server so try to follow these cmds :
ssh-keygen
ssh-copy-id clint@stbkp01
So in that step you will almost finish you must just run you script and check the destination dir that it contains backup files
Though the zip files are getting copied to application server and backup server.
however, I am prompted for user password. so somewhere I am going wrong.