Hi, i have structure of pbs - see below. I want to know how much space ocuppied customer1,2,3 etc... by their namespaces because we group their machines there.
Is my code correct or just something missing ?
I dont want to write script thats "du chunks" in their blob files
Is there easier method to do that ?
Is my code correct or just something missing ?
Code:
root@proxmox-backup:/mnt/datastore/internal/ns/customer1/ns# find -type f -name 'index.json.blob' -exec proxmox-backup-debug inspect file {} --decode - \; | sed 's/\}size.*/\}/' | grep -v encryption | jq '.unprotected.chunk_upload_stats.size /1024 / 1024 / 1024' | jq -s 'add | "\( . | round * 10 / 10) GB"'
"819 GB"
Is there easier method to do that ?
Code:
/mnt/datastore/internal/
└── ns
├── customer1
│ └── ns
│ ├── customer1-hw1
│ ├── customer1-hw2
│ └── customer1-hw3
├── customer2
│ └── ns
│ ├── customer2-hw1
│ ├── customer2-hw2
│ └── customer2-hw3
├── customer3
│ └── ns
│ ├── proxmox4
│ ├── proxmox6
│ ├── proxmox7
│ └── proxmox8