Basic Usage
Back up a local directory:Configuration Options
Required Flags
| Flag | Description |
|---|---|
-source local:<path> | Specifies the local filesystem source and path 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) |
-volume-uuid <uuid> | Override volume UUID for portable drive identity |
-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, POSIX permissions, ownership, birth time, file flags, and extended attributes)
- The entry is passed to the backup engine
Extended File Attributes
On macOS and Linux, Cloudstic captures additional POSIX metadata for each file:| Attribute | macOS | Linux | SFTP |
|---|---|---|---|
| Permissions (mode) | ✅ | ✅ | ✅ |
| Ownership (uid/gid) | ✅ | ✅ | ✅ |
| Birth time (btime) | ✅ (always) | ✅ (kernel ≥ 4.11, filesystem dependent) | ❌ |
| File flags | ✅ (UF_/SF_) | ✅ (FS_*_FL via ioctl) | ❌ |
| Extended attributes | ✅ | ✅ | ❌ |
| Flag | Description |
|---|---|
-skip-mode | Skip all POSIX metadata (mode, uid, gid, btime, flags) |
-skip-flags | Skip file flags only (avoids extra file descriptor per entry on Linux) |
-skip-xattrs | Skip extended attribute collection |
-xattr-namespaces | Comma-separated prefixes to collect (e.g. user.,com.apple.) |
com.apple.provenance on macOS.
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) - Volume UUID: Filesystem volume UUID, auto-detected on macOS and Linux (optional)
- Volume label: Human-readable volume name (optional)
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
Enable packfiles
Packfiles bundle small objects to reduce store overhead and are enabled by default. No flag needed.
Common Use Cases
Personal Documents
Development Projects
System Configuration
Photo Library
Portable Drives
Back up a portable or external drive with automatic cross-machine incremental support:When you back up a portable drive from machine A, then plug it into machine B and back up again, Cloudstic uses the volume UUID to find the previous snapshot even though the hostname and mount point are different. Only changed files are uploaded.
| Platform | UUID detection | Label detection |
|---|---|---|
| macOS | ✓ Automatic (GPT partition UUID via diskutil, fallback to getattrlist) | ✓ Automatic |
| Linux | ✓ Automatic (GPT partition UUID via /dev/disk/by-partuuid/, fallback to /dev/disk/by-uuid/) | ✓ Automatic (/dev/disk/by-label/) |
| Windows | ✓ Automatic (GPT partition UUID via DeviceIoControl) | ✓ Automatic (GetVolumeInformation) |
| Drive format | macOS ↔ Linux | macOS/Linux ↔ Windows |
|---|---|---|
| GPT (exFAT, APFS, ext4) | ✓ Automatic | ✓ Automatic |
| MBR (older FAT32) | Requires -volume-uuid | Requires -volume-uuid |
Retention policies automatically group all snapshots of the same volume together across machines. A
-keep-daily 7 policy keeps 7 daily snapshots total, regardless of which machine created them.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