Update Readme
This commit is contained in:
parent
a8b9deac6a
commit
174450ec3d
60
README.md
60
README.md
@ -1,35 +1,51 @@
|
|||||||
# heavy_script
|
# heavy_script
|
||||||
Script that can: Update Truenas SCALE applications, Mount and unmount PVC storage, Prune Docker images.
|
Update | Backup | Restore | Mount PVC | Rollback Applications | Sync Catalog | Prune Docker Images
|
||||||
|
|
||||||
|
|
||||||
- -m | Initiates mounting feature, choose between unmounting and mounting PVC data"
|
| Flag | Example | Parameter | Description |
|
||||||
- -r | Opens a menu to restore a HeavyScript backup that was taken on you ix-applications pool"
|
|------ |------------------------ |----------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
- -b | Back-up your ix-applications dataset, specify a number after -b"
|
| -r | -r | None | Restore HeavyScript specific 'ix-applications dataset' snapshot |
|
||||||
- -i | Add application to ignore list, one by one, see example below."
|
| -m | -m | None | Initiates mounting feature<br>Choose between unmounting and mounting PVC data |
|
||||||
- -R | Roll-back applications if they fail to update
|
| -b | -b 14 | int | Backup 'ix-appliactions' dataset<br>Creates backups up to the number you've chosen |
|
||||||
- -S | Shutdown applications prior to updating
|
| -i | -i nextcloud -i sonarr | String | Applications listed will be ignored during updating |
|
||||||
- -v | verbose output
|
| -R | -R | None | Monitors applications after they update<br>If the app does not become "ACTIVE" after either:<br>The custom Timeout, or Default Timeout,<br>rollback the application. |
|
||||||
- -t | Set a custom timeout in seconds for -u or -U: This is the ammount of time the script will wait for an application to go from DEPLOYING to ACTIVE"
|
| -v | -v | None | Verbose output |
|
||||||
- -t | Set a custom timeout in seconds for -m: Amount of time script will wait for applications to stop, before timing out"
|
| -S | -S | None | Shutdown applications prior to updating |
|
||||||
- -s | sync catalog"
|
| -t | -t 150 | int | Set a custom timeout to be used with either:<br>-m <br>- Time the script will wait for application to be "STOPPED"<br>or<br>-u/U <br>- Time the script will wait for application to be either "STOPPED" or "ACTIVE" |
|
||||||
- -U | Update all applications, ignores versions"
|
| -s | -s | None | Sync Catalog before updating |
|
||||||
- -u | Update all applications, does not update Major releases"
|
| -U | -U | None | Update applications, ignoring major version changes |
|
||||||
- -p | Prune unused/old docker images"
|
| -u | -u | None | Update applications, do NOT update if there was a major version change |
|
||||||
|
| -p | -p | None | Prune old/unused docker images |
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
#### bash heavy_script.sh -b 14 -i portainer -i arch -i sonarr -i radarr -t 600 -sup
|
#### Typical Cron Job
|
||||||
- This is your typical cron job implementation.
|
```
|
||||||
|
bash heavy_script.sh -b 14 -i portainer -i arch -i sonarr -i radarr -t 600 -Rsup
|
||||||
|
```
|
||||||
|
|
||||||
- -b is set to 14. Up to 14 snapshots of your ix-applications dataset will be saved
|
- -b is set to 14. Up to 14 snapshots of your ix-applications dataset will be saved
|
||||||
- -i is set to ignore portainer, arch, sonarr, and radarr. These applications will be ignored when it comes to updates.
|
- -i is set to ignore portainer, arch, sonarr, and radarr. These applications will be ignored when it comes to updates.
|
||||||
- -t I set it to 600 seconds, this means the script will wait 600 seconds for the application to become ACTIVE before timing out and continuing to a different application.
|
- -t I set it to 600 seconds, this means the script will wait 600 seconds for the application to become ACTIVE before timing out and continuing to a different application.
|
||||||
- -s will just sync the repositories, ensuring you are downloading the latest updates
|
- -R Will rollback applications if they fail to deploy after updating.
|
||||||
|
- -s will just sync the repositories, ensuring you are downloading the latest updates.
|
||||||
- -u update applications as long as the major version has absolutely no change, if it does have a change it will ask the user to update manually.
|
- -u update applications as long as the major version has absolutely no change, if it does have a change it will ask the user to update manually.
|
||||||
- -p Prune docker images.
|
- -p Prune docker images.
|
||||||
|
|
||||||
- bash /mnt/tank/scripts/heavy_script.sh -t 8812 -m
|
#### Mounting PVC Data
|
||||||
- bash /mnt/tank/scripts/heavy_script/heavy_script.sh -r
|
|
||||||
|
|
||||||
|
```
|
||||||
|
bash /mnt/tank/scripts/heavy_script.sh -t 300 -m
|
||||||
|
```
|
||||||
|
|
||||||
### My personal Cron Job
|
#### Restoring ix-applications dataset
|
||||||
- ```git -C /mnt/speed/scripts/heavy_script pull && bash /mnt/speed/scripts/heavy_script/heavy_script.sh -b 14 -Rsup```
|
|
||||||
|
```
|
||||||
|
bash /mnt/tank/scripts/heavy_script/heavy_script.sh -r
|
||||||
|
```
|
||||||
|
|
||||||
|
#### My personal Cron Job
|
||||||
|
```
|
||||||
|
git -C /mnt/speed/scripts/heavy_script pull && bash /mnt/speed/scripts/heavy_script/heavy_script.sh -b 14 -Rsup
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user