An open API service indexing awesome lists of open source software.

https://github.com/scottgriv/bash-utility_scripts

Simple backup and deployment scripts written in Bash.
https://github.com/scottgriv/bash-utility_scripts

bash bash-script bash-scripting utility utility-app utility-application

Last synced: 2 months ago
JSON representation

Simple backup and deployment scripts written in Bash.

Awesome Lists containing this project

README

          









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](#features)
- [Backup Script (backup.sh)](#backup-script-backupsh)
- [Installation](#installation)
- [Usage](#usage)
- [Features](#features)
- [Notes](#notes)
- [Deployment Script (deploy.sh)](#deployment-script-deploysh)
- [Installation](#installation-1)
- [Usage](#usage-1)
- [Features](#features-1)
- [Notes](#notes-1)
- [Resources](#resources)
- [License](#license)
- [Credits](#credits)

## 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:
```bash
chmod +x backup.sh
```

2. Edit the script to set the source and backup directory paths:
```bash
SOURCE_DIR="/path/to/source"
BACKUP_DIR="/path/to/backup"
```

### Usage

```bash
./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:
```bash
chmod +x deploy.sh
```
2. Edit the script to set the project directory and server details:
```bash
PROJECT_DIR="/path/to/your/project"
REMOTE_SERVER="user@your-server.com"
REMOTE_DIR="/path/on/remote/server"
```

### Usage

```bash
./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

- [Bash Reference Manual](https://www.gnu.org/software/bash/manual/bash.html)
- [Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html)
- [Bash Scripting Tutorial](https://ryanstutorials.net/bash-scripting-tutorial/)
- [Bash Scripting Cheatsheet](https://devhints.io/bash)

## 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](https://choosealicense.com/licenses/unlicense/) removes traditional copyright restrictions, giving you the freedom to use the code in any way you choose.
- For more details, see the [LICENSE](LICENSE) file in this repository.

## Credits

**Author:** [Scott Grivner](https://github.com/scottgriv)

**Email:** [scott.grivner@gmail.com](mailto:scott.grivner@gmail.com)

**Website:** [linktr.ee/scottgriv](https://www.linktr.ee/scottgriv)

**Reference:** [Main Branch](https://github.com/scottgriv/bash-utility_scripts)

---------------