Digressive / HyperV-Backup-Utility

Flexible Hyper-V Backup Utility
https://gal.vin/posts/vm-backup-for-hyper-v/
MIT License
120 stars 38 forks source link

Unable to perform Backup #15

Closed marcheschi closed 2 years ago

marcheschi commented 2 years ago

Hi I have two servers and on one I'm unable to perform the backup, but I do not understand the error:

   _    _                    __      __  ____             _                  _    _ _   _ _ _ _           
  | |  | |                   \ \    / / |  _ \           | |                | |  | | | (_) (_) |          
  | |__| |_   _ _ __   ___ _ _\ \  / /  | |_) | __ _  ___| | ___   _ _ __   | |  | | |_ _| |_| |_ _   _   
  |  __  | | | | '_ \ / _ \ '__\ \/ /   |  _ < / _  |/ __| |/ / | | | '_ \  | |  | | __| | | | __| | | |  
  | |  | | |_| | |_) |  __/ |   \  /    | |_) | (_| | (__|   <| |_| | |_) | | |__| | |_| | | | |_| |_| |  
  |_|  |_|\__, | .__/ \___|_|    \/     |____/ \__,_|\___|_|\_\\__,_| .__/   \____/ \__|_|_|_|\__|\__, |  
           __/ | |                                                  | |                            __/ |  
          |___/|_|          Mike Galvin   https://gal.vin           |_|      Version 21.12.28     |___/   

************ Running with the following config *************.
Utility Version:.........21.12.28
Hostname:................WIN-TKDP0NBIOMR.
Windows Version:.........10.0.17763.
VMs to backup:...........
.........................IBE
.........................
Backup directory:........C:\Backup.
Working directory:.......C:\TEMP.
Backups to keep:.........No Config
Logs directory:..........No Config
E-mail log to:...........No Config
E-mail log from:.........No Config
E-mail subject:..........Default
SMTP server:.............No Config
SMTP Port:...............Default
SMTP user:...............No Config
SMTP pwd file:...........No Config
-UseSSL switch:..........False.
-NoPerms switch:.........False.
-ShortDate switch:.......False.
-Compress switch:........True.
-Sz switch:..............True.
7-zip installed:.........True.
7-zip Options:...........Default.
************************************************************
2022-01-13 16:59:34 [INFO] Process started.
2022-01-13 16:59:34 [INFO] (VM:IBE) Attempting to export VM
2022-01-13 17:37:13 [INFO] (VM:IBE) Removing all previous compressed backups
2022-01-13 17:37:13 [INFO] (VM:IBE) Compressing backup using 7-Zip compression
2022-01-13 18:41:38 [INFO] Backup directory C:\Backup doesn't exist. Creating it.
2022-01-13 18:41:38 [INFO] (VM:) Attempting to export VM
2022-01-13 18:41:38 [ERROR] (VM:) Impossibile convalidare l'argomento sul parametro 'Name'. L'argomento è null o vuoto. Fornire un argomento che non
 sia null o vuoto ed eseguire di nuovo il comando.
2022-01-13 18:41:38 [ERROR] (VM:) Export failed, VM skipped
2022-01-13 18:41:38 [INFO] Process finished.

Can you help me to understand what the problem is? Thank you Paolo

Digressive commented 2 years ago

Hi there, in the VMs list there's only 1 VM listed there? The Name can't be validated because there isn't one. Might be a space or hidden character in your VM list.

marcheschi commented 2 years ago

Hi The command I issued is: Hyper-V-Backup.ps1 -BackupTo C:\Backup -Wd C:\TEMP -Sz -Compress -VmList C:\Scripts\vms.txt.txt the backup is actually created in the backup folder and is: 36802568712 IBE-2022-01-13_17-37-13.7z On the server I have two VM. C:\Scripts\vms.txt.txt contains 3 lines first is IBE and 2 blank lines. So do you think the error is the second and third empty line? I tried by putting only 1 line. Thank you Paolo

Digressive commented 2 years ago

Ok, thanks for the info. I think the problem is the 2 blank lines, can you remove them and test again?

marcheschi commented 2 years ago

Yes, now without the blank lines it works. Thank you Paolo

Digressive commented 2 years ago

No problem 👍