#!/bin/bash clear # The files backup process # ~~~~~~~~~~~~~~~~~~~~~~~~ # Remove the file showing that a previous backup was successful echo "" echo -e "\e[1;33mRemove the file showing that a previous backup was successful...\e[0m" rm /home/foo/Backups/00.logs/iceshrimp_backup_files; echo -e "\e[32mDone\e[0m" # Backup all of the iceshrimp files echo "" echo -e "\e[1;33mBackup the iceshrimp files...\e[0m" # Remove old configs rm -r /home/foo/Backups/10.sites/iceshrimp/configs/*; # # Backup the default.yml cp -r /home/foo/iceshrimp/.config/default.yml /home/foo/Backups/10.sites/iceshrimp/configs/; # # Backup the iceshrimp.nginx.conf cp -r /etc/nginx/sites-available/iceshrimp.nginx.conf /home/foo/Backups/10.sites/iceshrimp/configs/; # # Backup the iceshrimp.service cp -r /etc/systemd/system/iceshrimp.service /home/foo/Backups/10.sites/iceshrimp/configs/; # # Remove old /files/ rm -r /home/foo/Backups/10.sites/iceshrimp/files/*; # # Backup the iceshrimp /files/ directory cp -r /home/foo/iceshrimp/files/. /home/foo/Backups/10.sites/iceshrimp/files/; echo -e "\e[32mDone\e[0m" # Create a file to show that the backup has successfully completed echo "" echo -e "\e[1;33mCreate a file to show that the backup has successfully completed...\e[0m" touch /home/foo/Backups/00.logs/iceshrimp_backup_files; echo -e "\e[32mDone\e[0m"