Skip to main content
A source is the origin of files during a backup. Cloudstic supports multiple source types, allowing you to back up data from local filesystems, remote servers, and cloud storage providers.

Available Sources

Cloudstic supports the following source types:

How Sources Work

All sources implement a common interface that provides:
  • File enumeration — Walk through all files and folders
  • File streaming — Read file content for backup
  • Metadata — Collect file attributes (size, modified time, owner)
  • Incremental support — Some sources support delta-based backups

Full vs. Incremental Backups

Full scan sources enumerate all files on every backup:
  • local — Local filesystem
  • sftp — SFTP server
  • gdrive — Google Drive
  • onedrive — OneDrive
Incremental sources use provider APIs to fetch only changed files:
  • gdrive-changes — Google Drive with Changes API (recommended)
  • onedrive-changes — OneDrive with Delta API
Incremental sources are significantly faster for subsequent backups because they only fetch changes since the last backup, rather than scanning the entire source.

Common Configuration

Exclude Patterns

All sources support exclude patterns using gitignore syntax:
cloudstic backup -source local -source-path ./documents \
  -exclude "*.tmp" \
  -exclude ".git/" \
  -exclude "node_modules/"
You can also load patterns from a file:
cloudstic backup -source local -source-path ./documents \
  -exclude-file .backupignore
Example .backupignore file:
# Temporary files
*.tmp
*.log
*.cache

# System files
.DS_Store
Thumbs.db

# Development
node_modules/
.git/
__pycache__/
*.pyc

# Build artifacts
dist/
build/
target/

Environment Variables

Common source-related environment variables:
VariableDescription
CLOUDSTIC_SOURCEDefault source type
CLOUDSTIC_SOURCE_PATHDefault source path (for local/SFTP)
CLOUDSTIC_DRIVE_IDGoogle Drive shared drive ID
CLOUDSTIC_ROOT_FOLDERGoogle Drive root folder ID

Source Information

Each backup snapshot stores source metadata that identifies where the data came from:
  • Type — Source type (e.g., local, gdrive, onedrive)
  • Account — Account identifier (hostname, email, user@host)
  • Path — Source-specific path or location
This information is used to:
  • Find the previous snapshot from the same source for incremental comparison
  • Group snapshots in retention policies
  • Display backup history

Choosing a Source Type

Use Local when:

  • Backing up files on the same machine as Cloudstic
  • You want the fastest backup performance
  • Files are on directly mounted storage

Use SFTP when:

  • Backing up files from a remote server
  • You have SSH access to the server
  • You want to avoid installing Cloudstic on the remote machine

Use Google Drive when:

  • Backing up cloud files from Google Drive
  • You want to preserve Google Drive’s folder structure
  • You need to back up Shared Drives
  • Use gdrive-changes for faster incremental backups

Use OneDrive when:

  • Backing up cloud files from Microsoft OneDrive
  • You want to preserve OneDrive’s folder structure
  • Use onedrive-changes for faster incremental backups

Next Steps