2023-06-13 09:49:58 +00:00
|
|
|
# Backup script
|
|
|
|
|
|
|
|
[](https://build.jcktrue.dk/jct/backupscript)
|
|
|
|
|
2023-06-19 08:34:54 +00:00
|
|
|
Backup script utilizing Rclone to backup local file systems and send notifications.
|
|
|
|
|
2023-11-27 09:58:23 +00:00
|
|
|
# Minimum requirements
|
2024-01-18 14:40:39 +00:00
|
|
|
- PHP8.1
|
2023-11-27 09:58:23 +00:00
|
|
|
- Composer to install required packages.
|
|
|
|
- Rclone installed
|
|
|
|
|
2023-06-19 08:34:54 +00:00
|
|
|
# Rclone install
|
2023-11-27 09:58:23 +00:00
|
|
|
rm rclone-current-linux-amd64.deb
|
2023-06-19 08:34:54 +00:00
|
|
|
wget https://downloads.rclone.org/rclone-current-linux-amd64.deb
|
|
|
|
sudo dpkg -i rclone-current-linux-amd64.deb
|
|
|
|
|
2023-11-27 09:58:23 +00:00
|
|
|
# For development
|
2023-08-31 13:15:06 +00:00
|
|
|
|
2023-11-03 13:29:50 +00:00
|
|
|
# PHP latest for debian
|
|
|
|
curl -sSL https://packages.sury.org/php/README.txt | sudo bash -x
|
|
|
|
sudo apt update
|
|
|
|
sudo apt upgrade
|
2024-01-18 14:40:39 +00:00
|
|
|
sudo apt install php8.3-cli php8.3-xml php8.3-curl php8.3-zip php8.3-xdebug php8.3-mbstring unzip wget graphviz plantuml
|
2023-11-03 13:29:50 +00:00
|
|
|
|
2023-11-27 09:58:23 +00:00
|
|
|
# PHP Docs
|
|
|
|
rm phpDocumentor.phar
|
|
|
|
wget https://phpdoc.org/phpDocumentor.phar
|
|
|
|
chmod +x phpDocumentor.phar
|
|
|
|
|
2023-11-03 13:29:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Infection install
|
|
|
|
rm infection.phar
|
2023-11-14 09:09:15 +00:00
|
|
|
wget https://github.com/infection/infection/releases/download/0.27.8/infection.phar
|
2023-11-03 13:29:50 +00:00
|
|
|
chmod +x infection.phar
|
|
|
|
|
|
|
|
# PHP CopyPasteDetector install
|
|
|
|
rm phpcpd.phar
|
|
|
|
wget https://phar.phpunit.de/phpcpd.phar
|
|
|
|
chmod +x phpcpd.phar
|
|
|
|
|
2023-08-31 13:15:06 +00:00
|
|
|
# Test, analyze, metrics, document
|
2023-11-03 13:29:50 +00:00
|
|
|
./composer.phar test-full && ./composer.phar analyze && ./composer.phar metrics && ./composer.phar doc
|
|
|
|
|
|
|
|
|