This commit is contained in:
Rob McEwan 2025-03-14 11:52:01 +10:00
parent a3526fc415
commit 80274dee8a
2 changed files with 305 additions and 4 deletions

View file

@ -23,12 +23,12 @@ echo "EXCLUDING ./Downloads & ./VirtualBoxVMs" | tee -a $backupDate-rob-homedir-
tar -czvf --exclude='./Downloads' --exclude='./VirtualBoxVMs' $backupDate-rob-homedir-backup.tar.gz /home/rob tar -czvf --exclude='./Downloads' --exclude='./VirtualBoxVMs' $backupDate-rob-homedir-backup.tar.gz /home/rob
echo "Uploading backup file to BackBlaze..." | & tee -a $backupDate-rob-homedir-backup.log #echo "Uploading backup file to BackBlaze..." | & tee -a $backupDate-rob-homedir-backup.log
rclone copy $backupDate-rob-homedir-backup.tar.gz b2:workhorse-laptop --progress >> $backupDate-rob-homedir-backup.log 2>&1 #rclone copy $backupDate-rob-homedir-backup.tar.gz b2:workhorse-laptop --progress >> $backupDate-rob-homedir-backup.log 2>&1
# remove the tar file from the main home folder after it's copied # remove the tar file from the main home folder after it's copied
echo "Removing local backup cache..." | tee -a rob-homedir-backup-$backupDate.log #echo "Removing local backup cache..." | tee -a rob-homedir-backup-$backupDate.log
rm -rf $backupDate-rob-homedir-backup.tar.gz >> rob-homedir-backup-$backupDate.log 2>&1 #rm -rf $backupDate-rob-homedir-backup.tar.gz >> rob-homedir-backup-$backupDate.log 2>&1
# Run System Update # Run System Update
echo "Running System Update..." | tee -a rob-homedir-backup-$backupDate.log echo "Running System Update..." | tee -a rob-homedir-backup-$backupDate.log

301
h -u origin main Normal file
View file

@ -0,0 +1,301 @@
commit a3526fc415abd73c587801e31effc0d578151e1b (HEAD -> main)
Author: Rob McEwan <rob@localhost.localdomain>
Date: Fri Mar 14 11:49:09 2025 +1000
scripts
commit 9a0c54adb36acff4d1818a0f9c4e0c14bc93d18d (origin/main, origin/HEAD)
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Fri Mar 14 11:33:27 2025 +1000
Add homedir-backup.sh
commit 1183b118427a7e9d162f6080f9ab376c52f7d6e7
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Thu Mar 13 17:21:31 2025 +1000
Update workhorse-laptop-backup.sh
commit 8803ff8376c415bcd3596a3c356d4aac94c0bb50
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Thu Mar 13 17:20:49 2025 +1000
Update workhorse-laptop-backup.sh
commit 6bf573a312907a5058533da25aa0d9513f971e3a
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Thu Mar 13 17:18:07 2025 +1000
Add workhorse-laptop-backup.sh
commit 3e1f089845992bea40556e0ef650fe13ec317ef7
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Wed Nov 20 23:37:48 2024 +1000
Update powershell/bts-onboarding.ps1
updated directories and trmm installer
commit a9648a11abda403e031c64a97edcdf25de1cf757
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Wed Nov 20 23:12:59 2024 +1000
Update powershell/bts-onboarding.ps1
commented out create support directories
commit d0b2b330f8ff9d8fadb0de401c523b4d84d8c377
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Wed Nov 20 23:10:37 2024 +1000
Update bts-anydesk.ps1
commented out add support directories
commit ee59daf704c866ad437f60521255d60bbd8ad7a2
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Tue Nov 12 01:43:07 2024 +0000
Update bash/backuptrmm.sh
commit 36218092377519cb74da76b1874b9a96db0b38a0
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Tue Nov 12 01:42:37 2024 +0000
Add bash/backuptrmm.sh
commit a726b0095a499371fb5a87755751d9f7600a5abb
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Mon Nov 4 01:21:13 2024 +0000
Add powershell/bts-onboarding.ps1
commit 37e2fb2c4bb5e9d80daac0564346fdb80b662f39
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Fri Nov 1 12:50:54 2024 +0000
Update bash/backupdocker2.sh
commit 9282267112225bacd1170c736cb22d959ef524a8
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Fri Nov 1 06:47:39 2024 +0000
Update transmission-docker-compose.yml
commit fc97f7b1eba1e8045c9bfaf3f7b63524c9265ce0
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Fri Nov 1 06:33:50 2024 +0000
Add transmission-docker-compose.yml
commit c160db9fe35ca11ab9535b01c7b4d3d99988d536
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Fri Nov 1 06:33:26 2024 +0000
Add mount-nfs-boot
commit 40b00d9f4e01e92c62702b17c00b0fc25dea047f
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Thu Oct 31 03:51:23 2024 +0000
Update RMD Psono Install.txt
commit 6f828fae0b8faa0e1bf6b60c614ca13188128d52
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Thu Oct 31 03:29:08 2024 +0000
Update RMD Psono Install.txt
commit 1207d05c08150272c80726fd34b802a48f506e1b
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Thu Oct 31 02:10:03 2024 +0000
Update RMD Psono Install.txt
commit a93cc2f758d7fe26e9daaa12b04cc89abd43756a
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Thu Oct 31 02:06:58 2024 +0000
Update RMD Psono Install.txt
commit 26f36d93b6d9d6a713dbf7b607b4a5679b8e2cc2
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Thu Oct 31 02:03:59 2024 +0000
Add RMD Psono Install.txt
commit e2b577c05e8499edb7ce0d0675a999769b992031
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Tue Oct 29 11:39:53 2024 +0000
Update wireguard.sh
commit c5da616bc56f5caf030dc7ddf84d68359bdf60ad
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Tue Oct 29 11:37:55 2024 +0000
Add wireguard.sh
commit 5713971bc682cf242a9c528a3f7777e018fb42c3
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Tue Oct 29 11:08:56 2024 +0000
Add radius-docker-compose.yml
commit 9c765b4a7d650c799ed40dcbee23165d18c3df62
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Tue Oct 29 10:03:48 2024 +0000
Update bash/backupdocker1.sh
commit c58189d73686f452fdb902fbbf3a125d3012b7eb
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Tue Oct 29 09:53:18 2024 +0000
Add open-webui-docker-compose.yml
commit 331c0ebd0e286be56840d45d6e0be11f9f852678
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Tue Oct 29 05:23:41 2024 +0000
Add rmdblog-ghost-docker-run.sh
commit dd707225d022e34f7fcc63fde352f1934d224065
Author: rgmcewan <rgmcewan@outlook.com>
Date: Mon Oct 28 23:10:10 2024 +1000
c
commit 33d134735a96deec51369888260b7c8782e90bb9
Author: rgmcewan <rgmcewan@outlook.com>
Date: Mon Oct 28 23:04:37 2024 +1000
changes
commit 4ce891691f558dc2e2a480767f8d07d0b3dd7c84
Author: rgmcewan <rgmcewan@outlook.com>
Date: Mon Oct 28 22:02:33 2024 +1000
new
commit e0937b21264428678e5c50116f900b80f0c1a447
Author: rgmcewan <rgmcewan@outlook.com>
Date: Mon Oct 28 20:39:22 2024 +1000
1
commit ecf0b5a5a0947e638b9e256fe34f67061cf0f173
Author: rgmcewan <rgmcewan@outlook.com>
Date: Mon Oct 28 20:38:22 2024 +1000
renamed repo & changed folder structure
commit 49a84a90a98f10e0b99f82b537f8268b3cd02ef9
Author: rgmcewan <rgmcewan@outlook.com>
Date: Mon Oct 28 19:44:35 2024 +1000
renamed files
commit 91c5d02a72d07639c2a1fc97443fd4409507f529
Author: rgmcewan <rgmcewan@outlook.com>
Date: Mon Oct 28 19:44:11 2024 +1000
renamed files
commit be2edde8e64a4b5acaf38952b60f1f386c6389a3
Author: rgmcewan <rgmcewan@outlook.com>
Date: Mon Oct 28 19:37:25 2024 +1000
modified backup directory
commit b1703854ea43cfc9d16416d08bd98204f02444b5
Author: rgmcewan <rgmcewan@outlook.com>
Date: Mon Oct 28 19:31:02 2024 +1000
Added apt update, moved old scripts
commit ed02b14f7478fa565454800ecda8d404357ae5fb
Author: rgmcewan <rgmcewan@outlook.com>
Date: Sat Oct 26 17:00:13 2024 +1000
Created backup script for docker1. Changed wording
commit 9e37189a28228b0e4c5d06fdb3d7be4973345aca
Author: rgmcewan <rgmcewan@outlook.com>
Date: Sat Oct 26 15:13:57 2024 +1000
added postfix smtp
commit cd74483e94bdd20df7a4fe0be815358833e6dce2
Author: rgmcewan <rgmcewan@outlook.com>
Date: Sat Oct 26 14:41:32 2024 +1000
new script with confirmation email
commit 9616c2ebe566399eaf83bc35f0ca8b7c36413688
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Sat Oct 26 02:22:32 2024 +0000
Update docker2-backup.sh
commit d02c658c997280b5b48b060524b0a7c8e0e290fb
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Sat Oct 26 02:18:02 2024 +0000
Update docker1-backup.sh
commit 52d78f02b3ea2c1d6f07e74f79d98dfe33ba8fff
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Sat Oct 26 01:50:18 2024 +0000
Update docker1-backup.sh
commit f8f29dcd2f1f318d2f21262ff6b07f3b022b849b
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Sat Oct 26 01:42:30 2024 +0000
Add docker1-backup.sh
Must be run as sudo
commit 555af6499f9cc928b5a87979e4dc4d93e23df448
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Sat Oct 26 01:40:33 2024 +0000
Add docker2-backup.sh
Stops all docker containers and backs up the /docker directory to BackBlaze using rclone. Rclone must be configured separately using <code>sudo rclone config</code>
(MUST BE RUN AS SUDO)
commit d1b15fb7ac2b010d39ca40a4088ddf1e6f12433e
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Fri Oct 25 13:12:58 2024 +0000
Update send-output-as-email-llama.sh
commit d1960744352e09680521500444af48517cbd4761
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Fri Oct 25 13:11:57 2024 +0000
Update sendoutputasemail-llama.sh
llama3:8b
Here is a simple bash script that displays a string of text and sends the full output of the script as an email:
Let me explain what each part of the script does:
The first two echo statements display a string of text and a separator line.
The OUTPUT=$(cat /dev/null) command uses command substitution to capture the output of the script as a variable. In this case, we're capturing nothing (since /dev/null is an empty file).
The mail -s "Test Email from Bash Script" recipient@example.com << EOF command sends an email using the mailx utility (or your preferred MTA). The -s option sets the subject line of the email.
The << EOF syntax starts a here document, which allows us to embed the email body within the script. The $OUTPUT variable is expanded to contain the output of the script, which is sent as the email body.
To use this script, simply save it to a file (e.g., send_email.sh) and make the file executable with the command chmod +x send_email.sh. Then, run the script using the command ./send_email.sh, replacing recipient@example.com with the actual email address you want to send the message to.
Note: This script assumes that you have the mailx utility installed on your system. If you don't have it, you can install it or use an alternative MTA like sendmail or smtplib.
commit 301cbde5d8c37926a951ccacd7c6082c43b4cb6f
Author: rob.mcewan <rgmcewan@outlook.com>
Date: Fri Oct 25 13:10:26 2024 +0000
Add sendoutputasemail.sh