Skip to content

scottgriv/bash-utility_scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Bash Badge
GitHub Badge Email Badge BuyMeACoffee Badge
Bronze


Bash Backup and Deployment Scripts

Bash is a command-line shell and scripting language that is available on most Unix-based operating systems, including Linux and MacOS. It is a powerful tool for automating tasks and can be used to create scripts that perform a variety of functions.


Table of Contents

Features

This repository contains two Bash scripts: backup.sh and deploy.sh. These scripts are designed to automate the backup and deployment processes for your projects.

  • The backup.sh script performs a backup of files from a source directory to a backup directory, creating a timestamped subdirectory for each backup.
  • The deploy.sh script simulates a basic deployment process for a web application. It assumes you have a project directory containing your web application files and you want to deploy them to a server.

Backup Script (backup.sh)

The backup.sh script performs a backup of files from a source directory to a backup directory, creating a timestamped subdirectory for each backup.

Installation

  1. Make the script executable:
chmod +x backup.sh
  1. Edit the script to set the source and backup directory paths:
SOURCE_DIR="/path/to/source"
BACKUP_DIR="/path/to/backup"

Usage

./backup.sh

Features

Creates a timestamped subdirectory in the backup directory for each backup. Copies files recursively from the source directory to the backup subdirectory.

Notes

  • The script uses the cp command to copy files. Adjust it to suit your needs.
  • This script is a basic example and can be expanded to include more advanced features.

Deployment Script (deploy.sh)

The deploy.sh script simulates a basic deployment process for a web application. It assumes you have a project directory containing your web application files and you want to deploy them to a server.

Installation

  1. Make the script executable:
chmod +x deploy.sh
  1. Edit the script to set the project directory and server details:
PROJECT_DIR="/path/to/your/project"
REMOTE_SERVER="user@your-server.com"
REMOTE_DIR="/path/on/remote/server"

Usage

./deploy.sh

Features

  • Simulates a deployment process by copying files to a remote server.
  • Includes customizable variables for project and server details.

Notes

  • Adjust the script to match your actual deployment process, including build steps and server restarts.
  • This script is a basic example and can be extended to accommodate your specific deployment needs.

Resources

License

This project is released under the terms of The Unlicense, which allows you to use, modify, and distribute the code as you see fit.

  • The Unlicense removes traditional copyright restrictions, giving you the freedom to use the code in any way you choose.
  • For more details, see the LICENSE file in this repository.

Credits

Author: Scott Grivner
Email: scott.grivner@gmail.com
Website: scottgrivner.dev
Reference: Main Branch