100 days of devops in, Day 10: Linux Bash Scripts

Lab: Website Backup Script

Server: App server and backup on Storage Server

Command:
./scripts/beta_backup.sh

Error:
‘xfusioncorp_beta.zip not found under /backup on Storage Server’

What I tried:

  • Verified zip file created locally
  • Checked ssh connection to storage server

hare I am sharing screenshot

It would have helped if you had shared the script in the screenshot.
Please refer to this post, and see if it helps.

#!/bin/bash

variables

SOURCE=“/var/www/html/beta”
DEST=“/backup/xfusioncorp_beta.zip”
STORAGE=“natasha@ststor01:/backup/”

create zip archive

zip -r $DEST $SOURCE

copy to storage server

scp $DEST $STORAGE