aidevops 3.5.503 → 3.5.505
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION +1 -1
- package/aidevops.sh +1 -1
- package/package.json +1 -1
- package/setup.sh +21 -2
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.5.
|
|
1
|
+
3.5.505
|
package/aidevops.sh
CHANGED
package/package.json
CHANGED
package/setup.sh
CHANGED
|
@@ -10,7 +10,7 @@ shopt -s inherit_errexit 2>/dev/null || true
|
|
|
10
10
|
# AI Assistant Server Access Framework Setup Script
|
|
11
11
|
# Helps developers set up the framework for their infrastructure
|
|
12
12
|
#
|
|
13
|
-
# Version: 3.5.
|
|
13
|
+
# Version: 3.5.505
|
|
14
14
|
#
|
|
15
15
|
# Quick Install:
|
|
16
16
|
# npm install -g aidevops && aidevops update (recommended)
|
|
@@ -500,14 +500,33 @@ create_backup_with_rotation() {
|
|
|
500
500
|
local backup_name="$2"
|
|
501
501
|
local backup_base="$HOME/.aidevops/${backup_name}-backups"
|
|
502
502
|
local backup_dir
|
|
503
|
+
local backup_target
|
|
503
504
|
backup_dir="$backup_base/$(date +%Y%m%d_%H%M%S)"
|
|
505
|
+
backup_target="$backup_dir/$(basename "$source_path")"
|
|
504
506
|
|
|
505
507
|
# Create backup directory
|
|
506
508
|
mkdir -p "$backup_dir"
|
|
507
509
|
|
|
508
510
|
# Copy source to backup
|
|
509
511
|
if [[ -d "$source_path" ]]; then
|
|
510
|
-
|
|
512
|
+
mkdir -p "$backup_target"
|
|
513
|
+
if command -v rsync >/dev/null 2>&1; then
|
|
514
|
+
local rsync_status=0
|
|
515
|
+
if rsync -a "$source_path/" "$backup_target/"; then
|
|
516
|
+
rsync_status=0
|
|
517
|
+
else
|
|
518
|
+
rsync_status=$?
|
|
519
|
+
fi
|
|
520
|
+
|
|
521
|
+
if [[ "$rsync_status" -eq 24 ]]; then
|
|
522
|
+
print_warning "Backup completed with missing source entries skipped: $source_path"
|
|
523
|
+
elif [[ "$rsync_status" -ne 0 ]]; then
|
|
524
|
+
print_error "Backup failed for $source_path (rsync exit $rsync_status)"
|
|
525
|
+
return "$rsync_status"
|
|
526
|
+
fi
|
|
527
|
+
else
|
|
528
|
+
cp -R "$source_path" "$backup_dir/"
|
|
529
|
+
fi
|
|
511
530
|
elif [[ -f "$source_path" ]]; then
|
|
512
531
|
cp "$source_path" "$backup_dir/"
|
|
513
532
|
else
|