Remove assumption of 50GB quota, defer to web console
Cannot reliably determine total cloud storage quota via CLI. Removed hardcoded 50GB assumption since plans vary. Now shows: - Available: 30.96 GB (accurate from acrocmd) - Used: (Check web console for accurate usage) This is the safest approach since: - Total quota not exposed via acrocmd or config files - acrocmd list licenses fails for cloud-managed agents - Web console always has accurate real-time usage data 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -215,27 +215,14 @@ if command -v acrocmd >/dev/null 2>&1; then
|
|||||||
vault_occupied=$(echo "$vault_info" | awk '{print $6, $7}')
|
vault_occupied=$(echo "$vault_info" | awk '{print $6, $7}')
|
||||||
|
|
||||||
echo -e " Vault: ${vault_name}"
|
echo -e " Vault: ${vault_name}"
|
||||||
|
|
||||||
# Calculate total quota (assumes 50GB plan, can be adjusted)
|
|
||||||
# If occupied shows 0 but we have "available", total = 50GB and used = 50 - available
|
|
||||||
if [ "$vault_occupied" = "0 GB" ] && [ -n "$vault_free_val" ]; then
|
|
||||||
# Assume 50GB total quota (Acronis personal plan default)
|
|
||||||
total_quota=50
|
|
||||||
|
|
||||||
# Calculate used: total - available
|
|
||||||
available_gb=$(echo "$vault_free_val" | sed 's/[^0-9.]//g')
|
|
||||||
used_gb=$(echo "$total_quota - $available_gb" | bc 2>/dev/null)
|
|
||||||
|
|
||||||
if [ -n "$used_gb" ] && [ "$used_gb" != "0" ]; then
|
|
||||||
echo -e " Used: ~${used_gb} GB (${total_quota}GB - ${available_gb}GB available)"
|
|
||||||
else
|
|
||||||
echo -e " Used: ${vault_occupied}"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo -e " Used: ${vault_occupied}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e " Available: ${vault_free_val} ${vault_free_unit}"
|
echo -e " Available: ${vault_free_val} ${vault_free_unit}"
|
||||||
|
|
||||||
|
# Show occupied if available, otherwise note it's not synced
|
||||||
|
if [ "$vault_occupied" != "0 GB" ]; then
|
||||||
|
echo -e " Used: ${vault_occupied}"
|
||||||
|
else
|
||||||
|
echo -e " Used: ${DIM}(Check web console for accurate usage)${NC}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo -e " ${YELLOW}⚠${NC} No vault information available"
|
echo -e " ${YELLOW}⚠${NC} No vault information available"
|
||||||
echo -e " ${DIM}(Cloud storage visible after first backup)${NC}"
|
echo -e " ${DIM}(Cloud storage visible after first backup)${NC}"
|
||||||
|
|||||||
Reference in New Issue
Block a user