@@ -31,6 +31,22 @@ redisctl enterprise support-package cluster --skip-checks
3131
3232# Use new API endpoints (Redis Enterprise 7.4+)
3333redisctl enterprise support-package cluster --use-new-api
34+
35+ # Optimize package size (reduces by ~20-30%)
36+ redisctl enterprise support-package cluster --optimize
37+
38+ # Show optimization details
39+ redisctl enterprise support-package cluster --optimize --optimize-verbose
40+
41+ # Upload directly to Redis Support (Files.com)
42+ export REDIS_ENTERPRISE_FILES_API_KEY=" your-api-key"
43+ redisctl enterprise support-package cluster --upload
44+
45+ # Upload without saving locally
46+ redisctl enterprise support-package cluster --upload --no-save
47+
48+ # Optimize and upload in one command
49+ redisctl enterprise support-package cluster --optimize --upload --no-save
3450```
3551
3652** Example Output** :
@@ -132,6 +148,139 @@ Next steps:
1321483. Delete local file after upload to free space
133149```
134150
151+ ## Package Optimization
152+
153+ Support packages can be large (500MB-2GB+). The ` --optimize ` flag reduces package size by 20-30% through:
154+
155+ - ** Log truncation** : Keeps most recent 1000 lines per log file (configurable)
156+ - ** Redundant data removal** : Removes duplicate or unnecessary files
157+ - ** Nested archive cleanup** : Removes nested .gz files
158+
159+ ### Basic Optimization
160+
161+ ``` bash
162+ # Optimize with defaults
163+ redisctl enterprise support-package cluster --optimize
164+
165+ # Customize log retention
166+ redisctl enterprise support-package cluster --optimize --log-lines 5000
167+
168+ # Show detailed optimization stats
169+ redisctl enterprise support-package cluster --optimize --optimize-verbose
170+ ```
171+
172+ ### Optimization Output
173+
174+ ```
175+ Optimization: 487.3 MB → 358.2 MB (26.5% reduction)
176+
177+ Files processed: 847
178+ Files truncated: 142
179+ Files removed: 23
180+ ```
181+
182+ ### When to Use Optimization
183+
184+ ** Use optimization when:**
185+ - Package size exceeds upload limits
186+ - Network bandwidth is limited
187+ - Storage space is constrained
188+ - Only recent log data is needed
189+
190+ ** Skip optimization when:**
191+ - Full historical logs are needed for issue diagnosis
192+ - Investigating intermittent issues from the past
193+ - Redis Support specifically requests unoptimized packages
194+
195+ ## Direct Upload to Redis Support
196+
197+ Upload support packages directly to Files.com for Redis Support tickets, eliminating manual upload steps.
198+
199+ ### Setup Files.com API Key
200+
201+ Get your Files.com API key from Redis Support, then configure it:
202+
203+ ``` bash
204+ # Option 1: Environment variable (recommended for CI/CD)
205+ export REDIS_ENTERPRISE_FILES_API_KEY=" your-api-key"
206+
207+ # Option 2: Secure keyring storage (requires secure-storage feature)
208+ redisctl files-key set " $REDIS_ENTERPRISE_FILES_API_KEY " --use-keyring
209+
210+ # Option 3: Global config file (plaintext)
211+ redisctl files-key set " $REDIS_ENTERPRISE_FILES_API_KEY " --global
212+
213+ # Option 4: Per-profile config
214+ redisctl files-key set " $REDIS_ENTERPRISE_FILES_API_KEY " --profile enterprise-prod
215+ ```
216+
217+ ### Upload Commands
218+
219+ ``` bash
220+ # Generate and upload
221+ redisctl enterprise support-package cluster --upload
222+
223+ # Upload without local copy (saves disk space)
224+ redisctl enterprise support-package cluster --upload --no-save
225+
226+ # Optimize before upload (recommended)
227+ redisctl enterprise support-package cluster --optimize --upload --no-save
228+
229+ # Database-specific package
230+ redisctl enterprise support-package database 1 --optimize --upload
231+ ```
232+
233+ ### Upload Output
234+
235+ ```
236+ Generating support package...
237+ Uploading to Files.com: /RLEC_Customers/Uploads/support-package-cluster-20240115T143000.tar.gz
238+ Size: 358234567 bytes
239+
240+ ✓ Support package created successfully
241+ Uploaded to: RLEC_Customers/Uploads/support-package-cluster-20240115T143000.tar.gz
242+ Size: 341.7 MB
243+ Time: 124s
244+ ```
245+
246+ ### API Key Priority
247+
248+ The Files.com API key is resolved in this order:
249+
250+ 1 . ` REDIS_ENTERPRISE_FILES_API_KEY ` environment variable
251+ 2 . Profile-specific ` files_api_key ` in config
252+ 3 . Global ` files_api_key ` in config
253+ 4 . System keyring (if secure-storage feature enabled)
254+ 5 . ` REDIS_FILES_API_KEY ` environment variable (fallback)
255+
256+ ### Secure API Key Storage
257+
258+ With the ` secure-storage ` feature, API keys are stored in your OS keyring:
259+
260+ - ** macOS** : Keychain
261+ - ** Windows** : Credential Manager
262+ - ** Linux** : Secret Service (GNOME Keyring, KWallet)
263+
264+ ``` bash
265+ # Install with secure storage
266+ cargo install redisctl --features secure-storage
267+
268+ # Store key securely
269+ redisctl files-key set " $REDIS_ENTERPRISE_FILES_API_KEY " --use-keyring
270+
271+ # Verify storage
272+ redisctl files-key get
273+ # Output: Key found in keyring: your-ke...key4
274+
275+ # Remove when no longer needed
276+ redisctl files-key remove --keyring
277+ ```
278+
279+ The config file only stores a reference:
280+ ``` toml
281+ files_api_key = " keyring:files-api-key"
282+ ```
283+
135284## Pre-flight Checks
136285
137286The command automatically performs safety checks before generating packages:
0 commit comments