-
Notifications
You must be signed in to change notification settings - Fork 11
Installing
There are multiple ways to acquire the script.
The recommended method is using git.
To download/clone the script/repo:
git clone https://github.com/UnconnectedBedna/shrink-backup
A directory called shrink-backup will be created containing required files.
While in the directory where the script is located, type:
git pull
To switch between the main and testing branches:
# directory where the script is located
cd /path/to/shrink-backup
# switch to testing
git checkout testing
# switch back to main
git checkout main
Check the release page and download the tar.gz file from desired release.
Extract the files in desired location and run script.
wget https://raw.githubusercontent.com/UnconnectedBedna/shrink-backup/main/shrink-backup -O shrink-backup
Be aware that only the script file will be downloaded. It will work just fine, but if not using default exclude directories (using option -t), the config file (exclude.txt) will have to be created manually. Please see: -t (exclude.txt)
To make the script executable:
chmod +x shrink-backup
To update, re-run the wget line to overwrite the old version of shrink-backup.
Special thanks to framps
By using this installer, files for the application will be installed at appropriate locations on your system, make the script executable and available within $PATH.
As always, when running scripts directly from the internet, make sure you know the code is safe, ESPECIALLY when used in combination with sudo.
The install script is located in its own branch of this repo.
Install with:
curl https://raw.githubusercontent.com/UnconnectedBedna/shrink-backup/install/installer.sh | sudo bash
To update, rerun the install script with above line.
Note that exclude.txt is renamed to shrink-backup.conf and placed in /usr/local/etc.
Script location: /usr/local/sbin/shrink-backup
Exclude file location: /usr/local/etc/shrink-backup.conf
README location: /usr/share/doc/shrink-backup/README.md
LICENSE location: /usr/share/doc/shrink-backup/LICENSE
Log location: /var/log/shrink-backup.log