mirror of
				https://gitlab.sectorq.eu/jaydee/omv_backup.git
				synced 2025-10-30 10:01:11 +01:00 
			
		
		
		
	lala
This commit is contained in:
		| @@ -330,7 +330,7 @@ if _BACKUP: | |||||||
|                     now = datetime.datetime.now() |                     now = datetime.datetime.now() | ||||||
|                     BACKUP_HOST = "root@omv.home.lan" |                     BACKUP_HOST = "root@omv.home.lan" | ||||||
|                     BACKUP_DEVICE = "/srv/dev-disk-by-uuid-2f843500-95b6-43b0-bea1-9b67032989b8" |                     BACKUP_DEVICE = "/srv/dev-disk-by-uuid-2f843500-95b6-43b0-bea1-9b67032989b8" | ||||||
|                     BACKUP_DIR = f"{BACKUP_HOST}/{SOURCE_DIR}" |                     BACKUP_DIR = f"{BACKUP_HOST}:{SOURCE_DIR}" | ||||||
|                      |                      | ||||||
|                     DATETIME = now.strftime("%Y-%m-%d_%H-%M-%S") |                     DATETIME = now.strftime("%Y-%m-%d_%H-%M-%S") | ||||||
|                      |                      | ||||||
| @@ -338,9 +338,8 @@ if _BACKUP: | |||||||
|                         NEW_BACKUP_DIR = f"{BACKUP_DEVICE}/backup/{host}/{b}/initial" |                         NEW_BACKUP_DIR = f"{BACKUP_DEVICE}/backup/{host}/{b}/initial" | ||||||
|                     else: |                     else: | ||||||
|                         NEW_BACKUP_DIR = f"{BACKUP_DEVICE}/backup/{host}/{b}/{DATETIME}" |                         NEW_BACKUP_DIR = f"{BACKUP_DEVICE}/backup/{host}/{b}/{DATETIME}" | ||||||
|                     LATEST_LINK="{}/latest".format(BACKUP_DIR) |    | ||||||
|                     FULL_BACKUP_LATEST = f"{NEW_BACKUP_DIR}/latest" |                     FULL_BACKUP_LATEST = f"{BACKUP_DEVICE}/backup/{host}/{b}/latest" | ||||||
|                     LATEST_LINK = f"/{host}/{b}/latest" |  | ||||||
|  |  | ||||||
|  |  | ||||||
|                     msg = {"status":"started","bak_name":b,"start_time":DATETIME,"end_time":"in progress", "progress":0} |                     msg = {"status":"started","bak_name":b,"start_time":DATETIME,"end_time":"in progress", "progress":0} | ||||||
| @@ -360,7 +359,7 @@ if _BACKUP: | |||||||
|                     if _FIRST: |                     if _FIRST: | ||||||
|                         cmnd = f"rsync -avz --delete {SOURCE_DIR} --exclude=\"gitlab/logs/prometheus\" --exclude=\"home-assistant.log\" --exclude=\"gitlab/logs/*\" --exclude=\"esphome/config/.esphome\" --exclude=\".cache\" --exclude=\".git\" --exclude=\"var_lib_motioneye\" rsync://{BACKUP_HOST}{BACKUP_PATH}"      |                         cmnd = f"rsync -avz --delete {SOURCE_DIR} --exclude=\"gitlab/logs/prometheus\" --exclude=\"home-assistant.log\" --exclude=\"gitlab/logs/*\" --exclude=\"esphome/config/.esphome\" --exclude=\".cache\" --exclude=\".git\" --exclude=\"var_lib_motioneye\" rsync://{BACKUP_HOST}{BACKUP_PATH}"      | ||||||
|                     else: |                     else: | ||||||
|                         cmnd = f"rsync -avz --delete {BACKUP_DIR} --link-dest {LATEST_LINK} --exclude=\"gitlab/logs/prometheus\" --exclude=\"home-assistant.log\" --exclude=\"gitlab/logs/*\" --exclude=\"esphome/config/.esphome\" --exclude=\".cache\" --exclude=\".git\" --exclude=\"var_lib_motioneye\" {NEW_BACKUP_DIR}" |                         cmnd = f"rsync -avz --delete {BACKUP_DIR} --link-dest {FULL_BACKUP_LATEST} --exclude=\"gitlab/logs/prometheus\" --exclude=\"home-assistant.log\" --exclude=\"gitlab/logs/*\" --exclude=\"esphome/config/.esphome\" --exclude=\".cache\" --exclude=\".git\" --exclude=\"var_lib_motioneye\" {NEW_BACKUP_DIR}" | ||||||
|  |  | ||||||
|                     ans = "y" |                     ans = "y" | ||||||
|                     print(cmnd) |                     print(cmnd) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user