cschantz
b98accbf61
Fix 10 HIGH integer comparisons in backup/maintenance/security modules
...
FIXES:
enable-cphulk.sh:
- Line 234: $file_ip_count → ${file_ip_count:-0}
- Line 333: $FAILED → ${FAILED:-0}
cleanup-toolkit-data.sh:
- Line 209: $cleaned_size → ${cleaned_size:-0} (3 instances)
- Line 236: $missing → ${missing:-0}
acronis-update.sh:
- Line 229: $UPGRADE_EXIT_CODE → ${UPGRADE_EXIT_CODE:-0}
acronis-install.sh:
- Line 301: $INSTALL_EXIT_CODE → ${INSTALL_EXIT_CODE:-0}
acronis-logs.sh:
- Line 64: $log_count → ${log_count:-0}
- Line 215: $old_logs → ${old_logs:-0}
IMPACT:
- Prevents errors in backup/maintenance scripts
- Safe defaults for all exit code checks
- More robust error handling
PROGRESS:
- Fixed 57+ integer comparison issues total
- Only 3 HIGH issues remaining!
- Total issues: 23 (was 41 originally)
2025-12-03 20:14:37 -05:00
cschantz
9cc1d70c83
Use toolkit downloads folder instead of /tmp or /root
...
Better approach per user suggestion:
- Downloads to: /root/server-toolkit/downloads/acronis-install-YYYYMMDD-HHMMSS/
- Keeps toolkit directory organized
- Avoids polluting /root
- Avoids /tmp noexec issues
- Added downloads/ to .gitignore
- Cleanup removes timestamped installation directory after completion
Benefits:
- All downloads in one place
- Easy to find if debugging needed
- Cleaner than scattered in /root
- Still allows execution (not in /tmp)
2025-11-06 16:06:35 -05:00
cschantz
0d82eefb1a
Fix installer execution by using /root instead of /tmp
...
Root cause: /tmp is mounted with noexec flag preventing execution.
Changed TEMP_DIR from /tmp/acronis-install to /root/acronis-install
This allows the installer binary to execute properly.
Verified: mount shows /tmp with noexec option
Solution: Use /root which allows execution
2025-11-06 16:03:06 -05:00
cschantz
29c260e85c
Simplify installer execution - remove overly strict checks
...
Removed the -x check that was failing despite file being executable.
Changed to simple file existence and size validation instead.
Back to direct execution (./ ) instead of bash wrapper.
The file shows -rwxr-xr-x so it has execute permissions.
The issue was the test itself, not the permissions.
2025-11-06 16:00:50 -05:00
cschantz
03aea73fca
Fix Acronis installer execution permissions issue
...
Changes:
- Added verification after chmod +x to ensure permissions were set
- Changed execution from './file' to 'bash ./file' for better compatibility
- Added detailed error handling if chmod fails
- Shows file permissions on error for debugging
This fixes 'Permission denied' error (exit code 126) when running installer.
2025-11-06 15:58:24 -05:00
cschantz
d4878c2d27
Fix installer confirmation to accept 'y' in addition to 'yes'
...
Changed confirmation check from exact 'yes' match to regex pattern that accepts:
- y, Y
- yes, Yes, YES
- Any case variation
This prevents user frustration when typing 'y' instead of full 'yes'.
2025-11-06 15:46:13 -05:00
cschantz
95f9253302
Enhance Acronis installer with advanced/custom mode and better token handling
...
Added option 5 "Advanced/Custom installation" to installer with:
Interactive Option Builder:
- Unattended mode toggle (auto-accept prompts)
- Registration options:
* Register with token during install
* Skip registration (register later)
* Interactive (let installer prompt)
- Verbose logging flag
- Custom flags input for any additional options
(proxy, language, bandwidth throttling, etc.)
Improved Token Input:
- Better instructions for obtaining token from web console
- Automatic whitespace/linebreak removal for pasted tokens
- Works with copy-paste from web console
- Handles multi-line paste gracefully
Enhanced Service URL Selection:
- Shows common regions with examples:
* us5-cloud.acronis.com (US)
* eu2-cloud.acronis.com (Europe)
* ap1-cloud.acronis.com (Asia Pacific)
* ca1-cloud.acronis.com (Canada)
- Only prompts for URL when registration is enabled
Installation Modes Now Available:
1. Interactive installation - guided with prompts
2. Unattended installation - auto-accepts all
3. Install and register with token - one-step setup
4. Install without registration - defer registration
5. Advanced/Custom - build custom flag combination
Example Advanced Mode Usage:
- Select unattended: y
- Registration: option 1 (with token)
- Paste token: [automatically strips spaces]
- Verbose logging: y
- Custom flags: --proxy=http://proxy:8080
All flags are shown in summary before installation proceeds.
2025-11-05 21:39:57 -05:00
cschantz
e7eaabfcc5
Implement Acronis Cyber Protect agent management scripts
...
Created 11 comprehensive scripts for Acronis backup management:
Installation & Setup:
- acronis-install.sh: Download/install agent with multiple modes
* Interactive, unattended, with/without registration
* Supports token-based registration during install
* Auto-service startup and verification
- acronis-register.sh: Register agent with Acronis Cloud
* Validates service URL and token
* Shows current registration status
* Safe re-registration with confirmation
- acronis-configure.sh: Guidance for backup plan configuration
* Web console walkthrough
* Common backup plan examples
Backup Operations:
- acronis-manual-backup.sh: Manual backup creation guide
* Web console and CLI methods
* Ready for full CLI implementation
- acronis-status.sh: View backup status from logs
* Recent backup activity
* acrocmd integration ready
- acronis-list-backups.sh: List available backup archives
* acrocmd integration for archive listing
- acronis-restore.sh: Restore from backup guide
* Multiple restore methods explained
* Safety warnings and best practices
Management:
- acronis-agent-status.sh: Comprehensive service status
* All 4 services (aakore, mms, schedule, active-protection)
* Registration status, network ports, storage
* Quick actions: start/stop/restart/logs/version
- acronis-update.sh: Agent update management
* Auto and manual update methods
* Version checking
- acronis-logs.sh: Advanced log viewer
* View, tail, search logs
* Error filtering with color coding
* Log archival for old logs
- acronis-uninstall.sh: Safe agent removal
* Stops services, unregisters, removes packages
* Optional data retention
* Comprehensive cleanup
All scripts based on documented Acronis commands with proper error
handling, status validation, and user-friendly interfaces.
2025-11-05 21:30:19 -05:00