how to collect complete log of a backup job with multi nodes ?

chchang

Well-Known Member
Feb 6, 2018
33
4
48
46
I'd like to further analyze the current backup status of Proxmox VE

So the log of the existing backup job is required

I double clicked task from the web UI, and then CTRL +a/CTRL +c/CTRL +p select, copy and paste.

But the LOG pasted is incomplete

You can see the action video here

https://www.youtube.com/watch?v=XpWomilg5_s

I suspected it was a problem with the browser, so I tested both firefox and chrome with the same condition

I suspected it was notepad, so I pasted it in gedit, the same problem.

I don't know if you have the same situation?

Also, if I can't get the full LOG here

Is there any way to see the complete LOG of a task under the console?

In /var/log/vzdump there is a single log

However, it does not appear to be a record from the same backup task

/var/log/pve/task seems to have its own database format?

and if the backup job contains multi vm in multi nodes , each nodes will only backup "internal VMs" the external VMs will been excluded.

so I have to collect logs from each nodes to complete a backup job.

is there anyway to collect complete log of a backup job ?

and iis vzdump support logfile ? man vzdump no such option ...
 
The complete logs are in `/var/log/pve/task/`, however there is one level of subdirectories (to not put too many files in one single dir, since this makes accessing them quite slow in certain cases) - depending on how you start the backup there is a way to find the 'UPID' of the vzdump task:
e.g. in the GUI you click on the task entry - then on 'Status' and you get a string like:
'UPID:nodename:XXXXXXXX:XXXXXXX:XXXXXXXX:vzdump:vmid:root@pam:'
This is how the file is called below '/var/log/pve/task/' - you can use find to get its location:
`find /var/log/pve/tasks/ -name 'UPID:nodename:XXXXXXXX:XXXXXXX:XXXXXXXX:vzdump:vmid:root@pam:'`

hope this helps!
 
I'd like to further analyze the current backup status of Proxmox VE

You can also access the mails that are written which have the complete log attached and parse it. All mails are sent to the admin address so the user reading the mail will have all log messages from the cluster. This is maybe easier to handle than copied files from all nodes and parse them separately.
 
  • Like
Reactions: Stoiko Ivanov
proxmox splits a backup job to each nodes with different task ID , and that makes more difficult to get complete log of a backup job for me.

if a backup job contains multiple VMs on multiple nodes , then I will receive multiple backup notification mail , and have to determine what is the really backup job if I run multiple backup job from multiple nodes with distributed vms.

here is the easy scenario


pve01 / vmid 100,200,300
pve02 / vmid 101,201,301
pve03 / vmid 102,202,203,204,205,302

vm 100/101/102 are the vms for FA dept , and I create a backup pool for them named fa_bk_pool
vm 200/201/202/203/204/205 are the vms for HR dept , and I create a backup pool for HR dept named hr_bk_pool
vm 300/301/302 are the vms for sales , and sales_bk_pool

I want to backup the vms of same dept to their own backup pool in storage , so I create a backup job in proxmox , backup 100,101,102 to fa_bk_pool Mon-Fri at 1600.

with that scenario , I will receive 3 email notification , told me that vm 100/101/102 on node pve01/pve02/pve03 backup complete. sounds ok , isn`t it ?

but what if I have 30 vms on 10 nodes ? it`s a disaster for me to collect the backup job to generate report(how long it takes , how much space they used) to charge . and that`s my problem here.

is there any suggestions ?

and is that really can not copy log from WEB UI ?
 
is there any suggestions ?

Just use the logfiles that are written in the same location as your backups. For every dumpfile you'll get a logfile and you just need to parse it:

Code:
root@backup /proxmox/dump > cat vzdump-qemu-2023-2019_02_15-22_26_03.log
Feb 15 22:26:03 INFO: Starting Backup of VM 2023 (qemu)
Feb 15 22:26:03 INFO: status = running
Feb 15 22:26:04 INFO: update VM 2023: -lock backup
Feb 15 22:26:04 INFO: VM Name: docker
Feb 15 22:26:04 INFO: include disk 'scsi0' 'san-dx100:vm-2023-disk-1' 4G
Feb 15 22:26:04 INFO: exclude disk 'scsi1' 'san-dx100:vm-2023-disk-2' (backup=no)
Feb 15 22:26:05 INFO: backup mode: snapshot
Feb 15 22:26:05 INFO: ionice priority: 7
Feb 15 22:26:05 INFO: creating archive '/mnt/pve/backup-zfs/dump/vzdump-qemu-2023-2019_02_15-22_26_03.vma.lzo'
Feb 15 22:26:05 INFO: started backup task '0a850b0d-a510-42d1-8976-8e37b6c1edbc'
Feb 15 22:26:08 INFO: status: 10% (471334912/4294967296), sparse 3% (162267136), duration 3, 157/103 MB/s
Feb 15 22:26:11 INFO: status: 21% (912261120/4294967296), sparse 5% (251600896), duration 6, 146/117 MB/s
Feb 15 22:26:14 INFO: status: 30% (1311375360/4294967296), sparse 7% (323997696), duration 9, 133/108 MB/s
Feb 15 22:26:17 INFO: status: 39% (1699086336/4294967296), sparse 8% (358088704), duration 12, 129/117 MB/s
Feb 15 22:26:20 INFO: status: 54% (2328100864/4294967296), sparse 19% (831062016), duration 15, 209/52 MB/s
Feb 15 22:26:23 INFO: status: 70% (3032612864/4294967296), sparse 33% (1459855360), duration 18, 234/25 MB/s
Feb 15 22:26:26 INFO: status: 88% (3794403328/4294967296), sparse 51% (2221629440), duration 21, 253/0 MB/s
Feb 15 22:26:28 INFO: status: 100% (4294967296/4294967296), sparse 63% (2722193408), duration 23, 250/0 MB/s
Feb 15 22:26:28 INFO: transferred 4294 MB in 23 seconds (186 MB/s)
Feb 15 22:27:00 INFO: archive file size: 688MB
Feb 15 22:27:01 INFO: Finished Backup of VM 2023 (00:00:58)

Everything is there.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!