🚀 Auto-deploy: BrainKP atualizado em 22/06/2026 19:38:12
This commit is contained in:
+19
-6
@@ -12,12 +12,25 @@ echo "[$(date)] Backup Apps started"
|
||||
rm -rf "$BACKUP_DIR"
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
|
||||
# Backup important apps configs
|
||||
tar -czf "$BACKUP_DIR/apps-configs-$DATE.tar.gz" \
|
||||
/root/Apps/Camila \
|
||||
/root/Apps/RAG \
|
||||
/root/Apps/VOXDO \
|
||||
2>/dev/null || true
|
||||
# Loop over all directories in /root/Apps/
|
||||
cd /root/Apps
|
||||
for APP_DIR in */; do
|
||||
# Remove trailing slash
|
||||
APP_NAME=${APP_DIR%/}
|
||||
|
||||
# Skip if it's not a directory or if it is the backup-ui/BrainKP itself (to prevent recursion/lock if needed, though they are fine)
|
||||
[ -d "$APP_NAME" ] || continue
|
||||
|
||||
echo "Backing up app: $APP_NAME"
|
||||
|
||||
# Compress each app into its own tar.gz file, excluding heavy unnecessary folders
|
||||
tar -czf "$BACKUP_DIR/${APP_NAME}-$DATE.tar.gz" \
|
||||
--exclude="node_modules" \
|
||||
--exclude="venv" \
|
||||
--exclude=".venv" \
|
||||
--exclude="__pycache__" \
|
||||
"$APP_NAME" 2>/dev/null || true
|
||||
done
|
||||
|
||||
# Sync to Google Drive
|
||||
rclone copy "$BACKUP_DIR" "$DEST" --progress
|
||||
|
||||
Reference in New Issue
Block a user