Skip to content
Marcus Johansson edited this page Oct 21, 2024 · 9 revisions

There are multiple ways to acquire the script.
The recommended method is using git.


release file

Check the release page and download the tar.gz file from desired release.
Extract the files in desired location and run script.


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.

Update

While in the directory where the script is located, type:

git pull

Switch branch

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

wget

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, the config file will have to be created manually. Please see: -t (exclude.txt)

To make the script executable:

chmod +x shrink-backup

curl - shrink-backup install script

Special thanks to framps

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 script is located in it's 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.

By using this installer, files for the application will be installed at appropriate locations on your system and make the script executable.
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
Clone this wiki locally