Skip to main content

Why Backup?

Protect your API collections, environments, and history from:

Accidental Deletion

Recover deleted collections or requests

Data Corruption

Restore from corruption or file system errors

Hardware Failure

Recover from disk failures or computer loss

Sync Conflicts

Rollback to known good state after conflicts

Backup Strategies

Using Git provides automatic, versioned backups: Advantages:
  • ✅ Automatic backups on every sync
  • ✅ Complete version history
  • ✅ Easy rollback to any point
  • ✅ Team collaboration built-in
  • ✅ Remote storage included
Setup:
{
  "git": {
    "enabled": true,
    "remoteUrl": "[email protected]:username/api-collections.git",
    "autoSync": true,
    "syncInterval": 900
  }
}
Restore from Git:
# View history
git log --oneline

# Restore specific file
git checkout <commit-hash> -- collections/user-api.json

# Restore entire workspace to specific point
git checkout <commit-hash>

2. Time Machine (macOS)

macOS Time Machine automatically backs up Auk data: Setup:
  1. Enable Time Machine in System Preferences
  2. Auk data is automatically included
  3. Backups occur hourly
Restore:
  1. Open Time Machine
  2. Navigate to Auk workspace folder
  3. Select date to restore from
  4. Click “Restore”

3. Manual Backups

Create manual backups on demand:
# Backup single workspace
tar -czf ~/Backups/my-workspace-$(date +%Y%m%d).tar.gz \
  ~/Library/Application\ Support/Auk/workspaces/my-workspace/

# Backup all workspaces
tar -czf ~/Backups/auk-all-$(date +%Y%m%d).tar.gz \
  ~/Library/Application\ Support/Auk/workspaces/

# Backup to external drive
rsync -av ~/Library/Application\ Support/Auk/workspaces/ \
  /Volumes/Backup/Auk/

4. Automated Backup Script

Create a script for regular backups:
#!/bin/bash
# backup-auk.sh

BACKUP_DIR=~/Backups/Auk
WORKSPACE_DIR=~/Library/Application\ Support/Auk/workspaces
DATE=$(date +%Y%m%d-%H%M%S)
RETENTION_DAYS=30

# Create backup directory
mkdir -p $BACKUP_DIR

# Backup all workspaces
tar -czf $BACKUP_DIR/auk-backup-$DATE.tar.gz $WORKSPACE_DIR

# Delete old backups
find $BACKUP_DIR -name "auk-backup-*.tar.gz" -mtime +$RETENTION_DAYS -delete

echo "Backup completed: auk-backup-$DATE.tar.gz"
Schedule with cron:
# Edit crontab
crontab -e

# Add daily backup at 2 AM
0 2 * * * /path/to/backup-auk.sh

5. Cloud Backup

Backup to cloud storage:
# Sync workspace to Dropbox
rsync -av ~/Library/Application\ Support/Auk/workspaces/ \
  ~/Dropbox/Auk-Backup/

Restore Procedures

Restore from Git

1

View History

cd ~/Library/Application\ Support/Auk/workspaces/my-workspace
git log --oneline --graph
2

Find Commit

Identify the commit to restore to
3

Restore

# Restore specific file
git checkout <commit-hash> -- collections/user-api.json

# Restore entire workspace
git reset --hard <commit-hash>

# Or create new branch from old state
git checkout -b recovery <commit-hash>
4

Verify

Open Auk and verify data is restored correctly

Restore from Archive

1

Locate Backup

Find the backup archive to restore from
2

Close Auk

Ensure Auk is not running
3

Extract

# macOS/Linux
tar -xzf ~/Backups/auk-backup-20240220.tar.gz -C /tmp/

# Windows
Expand-Archive -Path $env:USERPROFILE\Backups\auk-backup-20240220.zip -DestinationPath C:\Temp\
4

Copy Files

# Backup current state first
mv ~/Library/Application\ Support/Auk/workspaces/my-workspace \
   ~/Library/Application\ Support/Auk/workspaces/my-workspace.old

# Restore from backup
cp -r /tmp/workspaces/my-workspace \
   ~/Library/Application\ Support/Auk/workspaces/
5

Verify

Open Auk and verify restoration

Restore from Time Machine

1

Open Time Machine

Click Time Machine icon in menu bar → “Enter Time Machine”
2

Navigate

Navigate to:
~/Library/Application Support/Auk/workspaces/my-workspace/
3

Select Date

Use timeline to find the date to restore from
4

Restore

Select files/folders and click “Restore”

Selective Restore

Restore specific items:
# From Git
git checkout <commit-hash> -- collections/user-api.json

# From archive
tar -xzf backup.tar.gz --strip-components=3 \
  workspaces/my-workspace/collections/user-api.json

Backup Best Practices

Follow the 3-2-1 backup rule:
  • 3 copies of data (original + 2 backups)
  • 2 different storage types (local + cloud)
  • 1 offsite backup (cloud or external drive)
Example:
  • Original: Auk workspace
  • Backup 1: Git remote (GitHub)
  • Backup 2: Time Machine / local archive
Backup regularly:
  • Git sync: Every 15 minutes (automatic)
  • Manual backup: Weekly
  • Cloud backup: Daily
  • External drive: Monthly
Regularly test restore procedures:
  1. Create test workspace
  2. Backup test workspace
  3. Delete test workspace
  4. Restore from backup
  5. Verify all data intact
Keep multiple backup versions:
  • Daily: Last 7 days
  • Weekly: Last 4 weeks
  • Monthly: Last 12 months
  • Yearly: Indefinite
Encrypt backups containing sensitive data:
# Encrypt backup
tar -czf - workspace/ | gpg -c > backup.tar.gz.gpg

# Decrypt backup
gpg -d backup.tar.gz.gpg | tar -xz

Backup Verification

Verify Backup Integrity

# Test archive
tar -tzf backup.tar.gz > /dev/null && echo "OK" || echo "CORRUPTED"

# List contents
tar -tzf backup.tar.gz | head -20

Disaster Recovery

Complete Data Loss

If all local data is lost:
1

Reinstall Auk

Download and install Auk
2

Restore from Git

# Clone workspace
git clone [email protected]:username/api-collections.git \
  ~/Library/Application\ Support/Auk/workspaces/my-workspace
3

Open in Auk

Open Auk and add workspace from cloned directory
4

Verify

Check all collections and environments are present

Partial Data Loss

If some data is lost:
  1. Identify Missing Data - What’s missing?
  2. Check Git History - Is it in Git?
  3. Check Backups - Is it in backups?
  4. Restore Selectively - Restore only missing items

Monitoring Backups

Backup Status Dashboard

Create a script to monitor backups:
#!/bin/bash
# check-backups.sh

echo "=== Auk Backup Status ==="
echo

# Git sync status
cd ~/Library/Application\ Support/Auk/workspaces/my-workspace
echo "Git Status:"
git status -sb
echo

# Last backup
echo "Last Manual Backup:"
ls -lht ~/Backups/Auk/ | head -2
echo

# Backup size
echo "Total Backup Size:"
du -sh ~/Backups/Auk/

Backup Alerts

Set up alerts for backup failures:
#!/bin/bash
# backup-with-alert.sh

if ! /path/to/backup-auk.sh; then
  # Send email alert
  echo "Auk backup failed!" | mail -s "Backup Alert" [email protected]

  # Or use notification
  osascript -e 'display notification "Auk backup failed!" with title "Backup Alert"'
fi

Next Steps

Git Sync

Set up automatic Git backups

Data Location

Find your workspace data

File System

Understand file storage

Workspace Settings

Configure workspace options