The local source backs up files and directories from your local filesystem. This is the simplest source type and provides the fastest backup performance.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Cloudstic/cli/llms.txt
Use this file to discover all available pages before exploring further.
Basic Usage
Back up a local directory:Configuration Options
Required Flags
| Flag | Description |
|---|---|
-source local | Specifies the local filesystem source |
-source-path <path> | Path to the directory to back up |
Optional Flags
| Flag | Description |
|---|---|
-exclude <pattern> | Exclude pattern (gitignore syntax, repeatable) |
-exclude-file <path> | Load exclude patterns from file |
-tag <tag> | Tag to apply to the snapshot (repeatable) |
-dry-run | Scan source without writing to store |
Examples
Basic Backup
Back up your documents folder:Backup with Exclusions
Exclude temporary files and build artifacts:Using an Exclude File
Create a.backupignore file:
Backup with Tags
Tag snapshots for easier identification:Dry Run
See what would be backed up without actually creating a snapshot:How It Works
File Scanning
The local source uses Go’sfilepath.Walk to recursively traverse the directory tree. For each file and folder:
- The relative path from the root is computed
- Exclude patterns are applied
- File metadata is collected (size, modified time)
- The entry is passed to the backup engine
File Identification
Local files are identified by their relative path from the source root. For example:- Source path:
/home/user/Documents - File:
/home/user/Documents/report.pdf - File ID:
report.pdf
- File:
/home/user/Documents/Projects/README.md - File ID:
Projects/README.md
Source Information
Each snapshot records:- Type:
local - Account: Machine hostname (e.g.,
mycomputer.local) - Path: Absolute path to the backup directory (e.g.,
/home/user/Documents)
Exclude Patterns
Exclude patterns use gitignore syntax:Pattern Examples
Wildcard Syntax
*— Matches any number of characters except/**— Matches any number of characters including/?— Matches a single character[abc]— Matches one character from the set[a-z]— Matches one character from the range
Negation
You can re-include files using!:
Symbolic Links
Performance Considerations
Fast Operations
The local source is the fastest because:- No network overhead
- Direct filesystem access
- Efficient file metadata retrieval
Typical Performance
On modern hardware:- Scanning: 10,000+ files/second
- Backup speed: Limited by storage and encryption overhead
- Incremental backups: Only changed files are uploaded
Optimizing Performance
Common Use Cases
Personal Documents
Development Projects
System Configuration
Photo Library
Troubleshooting
Permission Denied
If you encounter permission errors:- Run Cloudstic with appropriate permissions
- Exclude directories you don’t have access to
- Use
sudoif backing up system directories
Disk Space
For large backups, ensure you have sufficient disk space:Path Not Found
If the source path doesn’t exist:- Verify the path is correct
- Use absolute paths to avoid ambiguity
- Check that the directory exists before running backup
Environment Variables
Set default values using environment variables:Next Steps
SFTP Source
Learn about backing up remote servers
Restore Files
Learn how to restore your backed up files
Exclude Patterns
Master exclude pattern syntax
Incremental Backups
Understand how incremental backups work