Skip to main content
The local storage backend stores backups on the local filesystem. It’s ideal for external drives, NAS devices, or development/testing.

Configuration

Basic Setup

Initialize a repository with local storage:
The directory will be created automatically if it doesn’t exist.

Environment Variables

string
default:"local:./backup_store"
Storage backend URI. Use local:<path> to specify the backup directory path.

Examples

Features

Atomic Writes

The local store uses atomic writes for safety:
  1. Data is written to a temporary file with .tmp suffix
  2. The temporary file is renamed to the final path
  3. On POSIX systems, rename is atomic
This ensures backups are never corrupted by interrupted writes.

Directory Structure

The local store creates this structure:

Performance

Local storage offers the best performance:
  • Fast I/O: Direct filesystem access
  • No network latency: Eliminates network round-trips
  • Efficient deduplication: Fast local lookups
For networked filesystems (NFS, CIFS), performance depends on network speed and latency.

Best Practices

Backup Media

Pros:
  • Fast local backups
  • No cloud costs
  • Physical control
Considerations:
  • Keep drive disconnected when not in use
  • Store securely (encryption protects data)
  • Test restore regularly

Permissions

Ensure the backup directory has appropriate permissions:

Monitoring Disk Space

Monitor available space to avoid backup failures:
Use cloudstic prune regularly to reclaim space from deleted snapshots.

Troubleshooting

Permission Denied

If you see “permission denied” errors:

Disk Full

If the backup fails with “no space left on device”:
  1. Check available space: df -h /backup
  2. Run prune to reclaim space: cloudstic prune
  3. Consider forgetting old snapshots: cloudstic forget --keep-last 10 --prune

Network Mount Issues

For network mounts that disconnect:

Backup Command

Create backups with local storage

Prune Command

Reclaim disk space

S3 Storage

Use cloud storage instead

SFTP Storage

Use remote SSH storage