You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"COPY INTO @a5c7667401c0c728c2ef9703bdaea66d9ae2d906 FROM system.settings;" \
447
+
"settings""1""8"
448
+
total=$((total + stage_total))
449
+
success=$((success + stage_success))
450
+
451
+
# Stage 2: Columns
445
452
process_stage "Fetch System Columns" \
446
453
"COPY INTO @a5c7667401c0c728c2ef9703bdaea66d9ae2d906 FROM system.columns;" \
447
-
"columns""1""6"
454
+
"columns""2""8"
448
455
total=$((total + stage_total))
449
456
success=$((success + stage_success))
450
457
451
-
# Stage 2: User Functions
458
+
# Stage 3: User Functions
452
459
process_stage "Fetch User Functions" \
453
460
"COPY INTO @a5c7667401c0c728c2ef9703bdaea66d9ae2d906 FROM (SELECT * FROM system.user_functions);" \
454
-
"user_functions""2""6"
461
+
"user_functions""3""8"
455
462
total=$((total + stage_total))
456
463
success=$((success + stage_success))
457
464
458
-
# Stage 3: Query History - uses query_logs directory to match restore script expectations
465
+
# Stage 4: Query History - uses query_logs directory to match restore script expectations
459
466
local event_condition
460
467
event_condition=$(get_event_time_condition)
461
468
process_stage "Fetch Query History" \
462
469
"COPY INTO @a5c7667401c0c728c2ef9703bdaea66d9ae2d906 FROM (SELECT * FROM system_history.query_history WHERE $event_condition);" \
463
-
"query_logs""3""6"
470
+
"query_logs""4""8"
464
471
total=$((total + stage_total))
465
472
success=$((success + stage_success))
466
473
467
-
# Stage 4: Raw Logs - uses query_raw_logs directory to match restore script expectations
474
+
# Stage 5: Raw Logs - uses query_raw_logs directory to match restore script expectations
468
475
local time_condition
469
476
time_condition=$(get_time_condition)
470
477
process_stage "Fetch Raw Logs" \
471
478
"COPY INTO @a5c7667401c0c728c2ef9703bdaea66d9ae2d906 FROM (SELECT * FROM system_history.log_history WHERE $time_condition);" \
472
-
"query_raw_logs""4""6"
479
+
"query_raw_logs""5""8"
480
+
total=$((total + stage_total))
481
+
success=$((success + stage_success))
482
+
483
+
# Stage 6: Login History - uses login_history directory to match restore script expectations
484
+
local login_event_condition
485
+
login_event_condition=$(get_event_time_condition)
486
+
process_stage "Fetch Login History" \
487
+
"COPY INTO @a5c7667401c0c728c2ef9703bdaea66d9ae2d906 FROM (SELECT * FROM system_history.login_history WHERE $login_event_condition);" \
488
+
"login_history""6""8"
473
489
total=$((total + stage_total))
474
490
success=$((success + stage_success))
475
491
476
-
# Stage 5: Profile Logs - uses query_profile_logs directory to match restore script expectations
492
+
# Stage 7: Profile Logs - uses query_profile_logs directory to match restore script expectations
477
493
process_stage "Fetch Profile Logs" \
478
494
"COPY INTO @a5c7667401c0c728c2ef9703bdaea66d9ae2d906 FROM (SELECT * FROM system_history.profile_history WHERE $time_condition);" \
479
-
"query_profile_logs""5""6"
495
+
"query_profile_logs""7""8"
480
496
total=$((total + stage_total))
481
497
success=$((success + stage_success))
482
498
483
-
# Stage 6: Create Archive
499
+
# Stage 8: Create Archive
484
500
echo""
485
-
echo"[6/6] Creating archive and cleanup"
501
+
echo"[8/8] Creating archive and cleanup"
486
502
487
503
echo""
488
504
echo"Summary:"
@@ -499,7 +515,7 @@ main() {
499
515
fi
500
516
501
517
if [[ $success-gt 0 ]];then
502
-
if create_archive "$OUTPUT_DIR/columns""$OUTPUT_DIR/user_functions""$OUTPUT_DIR/query_logs""$OUTPUT_DIR/query_raw_logs""$OUTPUT_DIR/query_profile_logs";then
518
+
if create_archive "$OUTPUT_DIR/settings""$OUTPUT_DIR/columns""$OUTPUT_DIR/user_functions""$OUTPUT_DIR/query_logs""$OUTPUT_DIR/query_raw_logs""$OUTPUT_DIR/login_history""$OUTPUT_DIR/query_profile_logs";then
0 commit comments