기본 명령

기본 명령

# Check version
koneksi version

# Health check
koneksi health

입증

# Login with credentials
koneksi auth login --email user@example.com --password yourpassword 

# Logout
koneksi auth logout --email user@example.com

백업 및 복구 시나리오

백업 작업

  1. 파일 업로드

# Upload file
koneksi file upload --file-path /path/to/file.txt --email user@example.com
  1. 폴더 업로드

# Upload directory
koneksi directory upload --path /path/to/directory --email user@example.com
  1. 실시간 백업

# Add realtime backup location
koneksi realtime-backup path add --path /path/to/directory --email user@example.com

# Verify current backup location
koneksi realtime-backup path read --email user@example.com

# Start initial backup
koneksi realtime-backup realtime start --email user@example.com

# Start watcher to detect backup location changes
koneksi realtime-backup watcher start --email user@example.com

# List realtime backup queue to check in-progress / pending uploads
koneksi realtime-backup queues read --email user@example.com

# Stop watcher to disable backup location changes detection
koneksi realtime-backup watcher stop --email user@example.com

# Remove realtime backup location
koneksi realtime-backup path remove --email user@example.com

백업 확인

# List root directory content
koneksi directory read --email user@example.com

# List specific directory content
koneksi directory read --directory-id 6899f1bbdafb251035d62d67 --email user@example.com

복구 작업

# Create recovery request (it will start the initial recovery process)
koneksi recovery request --path /path/to/recovery-path --scope full --email user@example.com

# List recovery requests (view recovery requests history)
koneksi recovery list --email user@example.com

# List recovery request queue items (view all pending files to recover)
koneksi recovery list-queue --recovery-id 6899e7cedafb251035d62d66 --email user@example.com

# Process recovery queue (if recovery fails, we can use this to retry)
koneksi recovery process-queue --recovery-id 6899e7cedafb251035d62d66 --email user@example.com

# Delete recovery request (force stop ongoing recovery or remove recovery request from history)
koneksi recovery delete --recovery-id 6899e7cedafb251035d62d66 --email user@example.com

엔진 서비스 모니터링

로그 모니터링:

# Linux/macOS
tail -f koneksi-engine/koneksi-engine.log

# Windows
//cmd
type koneksi-engine\koneksi-engine.log

// powershell
Get-Content .\koneksi-engine\koneksi-engine.log -Wait

프로세스 상태 확인:

# Linux/macOS
ps aux | grep koneksi

# Windows
// cmd
tasklist | findstr /i koneksi

// powershell
Get-Process | Where-Object { $_.Name -like "*koneksi*" } | Select-Object Name, Id, CPU, WorkingSet

이메일 저장 기능

Koneksi CLI는 이제 이메일 주소를 로컬에 저장할 수 있도록 지원하므로 모든 명령에 이메일 주소를 입력할 필요가 없습니다. 이 기능은 반복적인 입력을 줄여 사용자 경험을 향상시킵니다.

작동 방식

CLI는 다음 위치에 있는 구성 파일에 이메일 주소를 저장합니다.

  • Windows: %USERPROFILE%\.koneksi\user.json

  • macOS/Linux: ~/.koneksi/user.json

명령

이메일 설정

  • 이 명령은 이메일 주소를 로컬 구성 파일에 저장합니다.

koneksi config set --email "your-email@example.com"

저장된 이메일 표시

  • 이 명령은 현재 저장된 이메일 주소를 표시합니다.

koneksi config show

저장된 이메일 지우기

  • 이 명령은 구성 파일에서 저장된 이메일 주소를 제거합니다.

koneksi config clear

용법

# Set email once
koneksi config set --email "john.doe@example.com"

# Use commands without --email flag
koneksi profile get
koneksi admin organizations list
koneksi files list

# Or still use --email flag to override stored email
koneksi profile get --email "different@example.com"

우선순위

명령에 이메일 주소가 필요한 경우 CLI는 다음 우선순위를 따릅니다.

  1. Command line flag (--email) - highest priority

  2. Stored configuration - fallback if no flag provided

  3. Error message - if neither is available

오류 처리

플래그 또는 저장된 구성을 통해 이메일이 제공되지 않으면 다음과 같은 유용한 오류 메시지가 표시됩니다.

Error: no email provided. Use --email flag or run 'koneksi config set' first

To set your email for future use, run:
  koneksi config set --email "your-email@example.com"

보안

  • 이메일은 로컬 컴퓨터에 저장됩니다.

  • 구성 파일은 표준 파일 권한(644)을 사용합니다.

  • 이 파일에는 민감한 데이터(비밀번호, 토큰)가 저장되지 않습니다.

  • 저장된 이메일은 언제든지 삭제할 수 있습니다.

이주

--email 플래그가 필요한 기존 명령은 이전과 동일하게 작동합니다. 새 시스템은 이전 버전과 호환됩니다.

구성 파일 형식

구성 파일(user.json)의 구조는 다음과 같습니다.

{
  "email": "your-email@example.com"
}

이후 버전에서는 이 파일에 추가적인 사용자 기본 설정이 포함될 수 있습니다.

문제 해결

이메일이 사용되지 않음

  • 이메일이 저장되었는지 확인하세요: koneksi config show

  • 저장된 이메일이 올바른지 확인하세요.

  • 다시 설정해 보세요: koneksi config set --email "your-email@example.com"

구성 파일 문제

  • 파일은 ~/.koneksi/user.json에 자동으로 생성됩니다.

  • 파일이 손상된 경우 삭제하고 이메일을 다시 설정하세요.

  • 액세스 문제가 발생하면 파일 권한을 확인하세요.

여러 사용자

  • 시스템의 각 사용자 계정에는 자체 구성 파일이 있습니다. 이메일은 전역이 아닌 사용자별로 저장됩니다.

Last updated