proxmox-backup-client snapshot list should list backups chronologically

ubu

Renowned Member
Nov 24, 2017
411
82
68
49
proxmox-backup-client snapshot list --output-format=json-pretty should list backups chronologically, and i am pretty shure it did some time ago
 
it does still here, but sorted first by type/id

so

vm/100/<snapshot1>
vm/100/<snapshot2>
vm/101/<snapshot1>
...

etc.

what does it show in your case?
 
proxmox-backup-client snapshot list ct/202 DOES list them chronologically.

With --output-fomat this is no longer the case:

date -u -d @`proxmox-backup-client snapshot list ct/202 --output-format=json |jq -j '.[0]."backup-time"'` +%FT%TZ

should show the latest entry (and did in the past) but now shows a random entry
 
you're right, but this can be solved on the client side e.g. with:

Code:
proxmox-backup-client snapshot list ct/ID --output-format json | jq 'sort_by(."backup-time")'

you can ofc open a bug report (https://bugzilla.proxmox.com) , but i guess this is simply done to be faster (since we read the snapshots in order we get it from the disk) and sorting would slow down the api request
 

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!