You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C Brightly edited this page Oct 27, 2016
·
6 revisions
Backup Script for BASH: backup.sh
BackupScript is a useful BASH script for backing up a users home directory (if the user is not 'root') or for backing up entire system (if run as 'root' / with root permissions). It also backs up /var/www into a separate archive by default.
Usage
For now, using the script is a rather straightforward affair:
bash backup.sh
While under heavy development, you can run some simple commands to make the script run a bit more smoothly, just copy and paste as little as one line and you should be OK!
chmod a+x backup.sh
This allows you to run the script with the following command instead of the above command, which requires a call to BASH
./backup.sh
...and then you are good to go!
Human Readable
Changelog:
Removed
HTML formatting from README file
Added a correctly
formatted README.md
Initial commit of work on
gh-pages branch
Notes:
As
of now the script does not
accept any arguments, however you
can modify the .sh file itself for
customization of variables; I
plan to add code allowing for
runtime arguments to be used to set
the backup source, destination,
backup retention (and duration of
retention) among other things... Also feel free to submit requests
for features or bug fixes at my github page for
this project.
TODO:
Add ability to pass switch setting source directory
Add ability to pass switch setting destination directory
Add switch for file and folder backup exclusions
Add optional switch to include or exclude WWW_ROOT (included by default)
Optional switch to set source directory for WWW_ROOT
Add optional switch to set compression variable & arg: tgz, bz2, ???
Optional switch to make backup destination external dev, mounted remote FS or SCP host