add backup restore feature and bump to 3.0.0 to surpass TrueUpdate
This commit is contained in:
		| @@ -35,7 +35,7 @@ Additional options are available: | |||||||
|  |  | ||||||
| ### Backup | ### Backup | ||||||
| - `truetool -b` or ` truetool --backup` backup the complete Apps system prior to updates. Deletes old backups prior, number of old backups can be set, 14 by default | - `truetool -b` or ` truetool --backup` backup the complete Apps system prior to updates. Deletes old backups prior, number of old backups can be set, 14 by default | ||||||
| - `truetool -r` or ` truetool --restore` **WIP** restores a specific backup by name | - `truetool -r` or ` truetool --restore` restores a specific backup by name | ||||||
| - `truetool -d` or ` truetool --delete` deletes a specific backup by name | - `truetool -d` or ` truetool --delete` deletes a specific backup by name | ||||||
|  |  | ||||||
| ### Other | ### Other | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								setup.py
									
									
									
									
									
								
							| @@ -7,7 +7,7 @@ README_MD = open(join(dirname(abspath(__file__)), "README.md")).read() | |||||||
|  |  | ||||||
| setup( | setup( | ||||||
|     name="truetool", |     name="truetool", | ||||||
|     version="2.1.0", |     version="3.0.0", | ||||||
|  |  | ||||||
|     # The packages that constitute your project. |     # The packages that constitute your project. | ||||||
|     # For my project, I have only one - "pydash". |     # For my project, I have only one - "pydash". | ||||||
|   | |||||||
| @@ -207,16 +207,9 @@ def get_backups_names(): | |||||||
|        |        | ||||||
| def apps_restore(): | def apps_restore(): | ||||||
|     print("Running Backup Restore...\n") |     print("Running Backup Restore...\n") | ||||||
|     command = "app kubernetes restore_backup backup_name="+RESTORE |     process = subprocess.run(["midclt", "call", "kubernetes.restore_backup", RESTORE], stdout=subprocess.PIPE) | ||||||
|     print(f"{command}") |     time.sleep(5) | ||||||
|     process = subprocess.Popen(["cli", "-c", command], stdout=subprocess.PIPE) |     print("Restoration started, please check the restoration process in the TrueNAS SCALE Web GUI...\n") | ||||||
|     while process.poll() is None: |  | ||||||
|         lines = process.stdout.readline() |  | ||||||
|         print (lines.decode('utf-8')) |  | ||||||
|     temp = process.stdout.read() |  | ||||||
|     if temp: |  | ||||||
|       print (temp.decode('utf-8')) |  | ||||||
|  |  | ||||||
|    |    | ||||||
| def run(): | def run(): | ||||||
|     process_args() |     process_args() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user