Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

Latest commit

 

History

History
129 lines (94 loc) · 4.86 KB

File metadata and controls

129 lines (94 loc) · 4.86 KB

webBackup

License Downloads Contributors Discord

Table of contents

About the project

webBackup should become a feature-rich, automated and customizable backup script for web applications.

Install

The following command downloads the latest version of the script to the current directory and runs the setup.

wget https://raw.githubusercontent.com/TitusKirch/webBackup/master/webBackup.sh && chmod +x webBackup.sh && ./webBackup.sh --setup

Then configure webBackup with your favorite editor (here the command with nano).

nano webBackup.config

Then install webBackup (during installation webBackup will be updated again).

./webBackup.sh --install

Here the whole installation process in one line

wget https://raw.githubusercontent.com/TitusKirch/webBackup/master/webBackup.sh && chmod +x webBackup.sh && ./webBackup.sh --setup && nano webBackup.config && ./webBackup.sh --install

Update

To update webBackup, execute the following command.

./webBackup.sh --update

How to use

webBackup creates a local copy of your database and/or files. Optional hourly (maximum 24), daily (maximum 7), weekly (maximum 5) or monthly (maximum 12) backup archives can be created. Important: Old backups will be overwritten. Furthermore there is the possibility to save backups additionally via ssh on another server.

Commands

Update backup files:

# long command
./webBackup.sh --backup

# short command
./webBackup.sh -b

Create a backup archive (optinal with transmission via ssh):

# long command
./webBackup.sh --archive-backup --hourly|--daily|--weekly|--monthly

# short command
./webBackup.sh -ab -h|-d|-w|-m

# long command with transmission via ssh
./webBackup.sh --archive-backup --hourly|--daily|--weekly|--monthly --ssh

# short command with transmission via ssh
./webBackup.sh -ab -h|-d|-w|-m -s

Update the backup files and create a backup archive (optinal with transmission via ssh):

# long command
./webBackup.sh --archive-backup-complete --hourly|--daily|--weekly|--monthly

# short command
./webBackup.sh -abc -h|-d|-w|-m

# long command with transmission via ssh
./webBackup.sh --archive-backupp-complete --hourly|--daily|--weekly|--monthly --ssh

# short command with transmission via ssh
./webBackup.sh -abc -h|-d|-w|-m -s

Example scenario with conjobs

Creates an hourly backup every hour at 10 past, a daily backup every day at 02:20, a weekly backup every Monday at 03:30 and a monthly backup every first day of a month at 04:40. Each time a backup is created, the backup files are updated and then a copy is transferred via ssh. (of course, the respective backup must be enabled in the configuration, despite the cronjob)

10 * * * * /path/to/webBackup.sh -abc -h -s >/dev/null 2>&1
20 2 * * * /path/to/webBackup.sh -abc -d -s >/dev/null 2>&1
30 3 * * 1 /path/to/webBackup.sh -abc -w -s >/dev/null 2>&1
40 4 1 * * /path/to/webBackup.sh -abc -d -s >/dev/null 2>&1

Contributing

There are many ways to help this open source project. Write tutorials, improve documentation, share bugs with others, make feature requests, or just write code. We look forward to every contribution.

For more information and our guidelines, please refer to the CONTRIBUTING.md file.

Versioning

We use SemVer for versioning. For available versions, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.