backup
Skill4 starsChanged 9 months agoMITView on GitHub
Backup and restore — files, databases, and system backups
- Deletes or force-pushes
- Installs packages
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 206
Use --dry-run before running backups
- Distinctive: line 207
Test restore procedures regularly
- Distinctive: line 208
Keep multiple backup generations
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Backup
Backup and restore files, databases, and systems.
Setup
Base tools (often pre-installed):
- macOS: rsync, tar included; for DB tools:
brew install postgresql mysql(pg_dump, mysqldump),brew install mongodb/brew/mongodb-database-tools(mongodump) - Ubuntu:
sudo apt install rsync(tar usually included),sudo apt install postgresql-client default-mysql-client mongodb-database-toolsfor DB backups
Cloud: rclone config for multi-cloud; aws configure for S3.
File Backups
rsync (Incremental)
# Basic sync
rsync -av /source/ /backup/
# With progress
rsync -av --progress /source/ /backup/
# Exclude patterns
rsync -av --exclude 'node_modules' --exclude '.git' --exclude '*.log' /source/ /backup/
# Remote backup
rsync -avz -e ssh /source/ user@remote:/backup/
# Delete files not in source (mirror)
rsync -av --delete /source/ /backup/
# Dry run
rsync -av --dry-run /source/ /backup/
# Backup with date
rsync -av --backup --backup-dir=/backup/$(date +%Y%m%d) /source/ /backup/current/tar Archives
# Create archive
tar -czvf backup.tar.gz /path/to/backup/
# With exclude
tar -czvf backup.tar.gz --exclude='*.log' --exclude='node_modules' /path/
# Split large archives
tar -czvf - /path/ | split -b 1G - backup.tar.gz.
# Verify archive
tar -tzvf backup.tar.gz
# Extract
tar -xzvf backup.tar.gz -C /destination/
# Incremental tar
tar --create --file=backup.tar --listed-incremental=backup.snar /path/Database Backups
PostgreSQL
# Full backup
pg_dump -h localhost -U user dbname > backup.sql
# Compressed
pg_dump -h localhost -U user dbname | gzip > backup.sql.gz
# All databases
pg_dumpall -U postgres > all_databases.sql
# Custom format (better for large DBs)
pg_dump -h localhost -U user -Fc dbname > backup.dump
# Restore from SQL
psql -h localhost -U user dbname < backup.sql
# Restore from custom format
pg_restore -h localhost -U user -d dbname backup.dumpMySQL
# Single database
mysqldump -u user -p dbname > backup.sql
# All databases
mysqldump -u user -p --all-databases > all_databases.sql
# With gzip
mysqldump -u user -p dbname | gzip > backup.sql.gz
# Specific tables
mysqldump -u user -p dbname table1 table2 > tables.sql
# Restore
mysql -u user -p dbname < backup.sqlMongoDB
# Export database
mongodump --uri="mongodb://user:pass@host/dbname" --out=backup/
# Export specific collection
mongodump --uri="mongodb://host/dbname" --collection=users --out=backup/
# Import database
mongorestore --uri="mongodb://host/dbname" backup/dbname/
# Export to JSON
mongoexport --uri="mongodb://host/dbname" --collection=users --out=users.jsonAutomated Backups
Cron Job
# Edit crontab
crontab -e
# Daily backup at 2 AM
0 2 * * * rsync -av /source/ /backup/ >> /var/log/backup.log 2>&1
# Weekly full backup
0 3 * * 0 tar -czvf /backup/weekly-$(date +\%Y\%m\%d).tar.gz /source/
# Monthly database backup
0 4 1 * * pg_dump -U user dbname | gzip > /backup/db-$(date +\%Y\%m).sql.gzBackup Script
#!/bin/bash
# backup.sh
DATE=$(date +%Y%m%d_%H%M%S)
BACKUP_DIR="/backup/$DATE"
SOURCE="/data"
mkdir -p "$BACKUP_DIR"
# Files
rsync -av "$SOURCE/" "$BACKUP_DIR/files/"
# Database
pg_dump -U user mydb | gzip > "$BACKUP_DIR/database.sql.gz"
# Cleanup old backups (keep last 7)
find /backup -type d -mtime +7 -exec rm -rf {} \;
echo "Backup completed: $BACKUP_DIR"Cloud Backup
AWS S3
# Sync to S3
aws s3 sync /local/ s3://bucket/backup/
# With glacier storage
aws s3 sync /local/ s3://bucket/backup/ --storage-class GLACIER
# Restore from S3
aws s3 sync s3://bucket/backup/ /local/rclone (Multi-cloud)
# Setup
rclone config
# Sync to Google Drive
rclone sync /local/ gdrive:backup/
# Sync to Dropbox
rclone sync /local/ dropbox:backup/
# Encrypted backup
rclone sync /local/ crypt:backup/Tips
- Use
--dry-runbefore running backups - Test restore procedures regularly
- Keep multiple backup generations
- Encrypt sensitive backups
- Store offsite or in cloud
Triggers
backup, restore, rsync, database backup, file backup, pg_dump, mysqldump, archive
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- ZimoLiao/scholaraio★ 577same name
- Alex8791-cyber/cognithor★ 158same name
- maxwellsdm1867/wheeler★ 12same name
- tombelieber/claude-backup★ 9same name
- mcpware/claude-code-backup★ 8same name
- redareda9/ghostty-resurrect★ 8same name
- ARCASSystems/FounderOS★ 6same name
- Anglesite/anglesite-skills★ 4same name
- nikosdion/devskills★ 3same name
- seanGSISG/claude-code-backup★ 3same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use restore and update.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
nikosdionSkillrestore
Restore a Joomla or WordPress site backup created by Akeeba Backup (Joomla/WordPress) or Akeeba Solo using Akeeba Kickstart and the Akeeba Backup Restoration Script, including multipart archive handling, restoration configuration, and post-restore cleanup.
Also in 4 projects that use this
AnthropicSkillupdate
Sync tasks and refresh memory from your current activity. Use when pulling new assignments from your project tracker into TASKS.md, triaging stale or overdue tasks, filling memory gaps for unknown people or projects, or running a comprehensive scan to catch todos buried in chat and email.
Also in 3 projects that use this
In this repository83 other files it gives its agents.
- a11y-axeSkill
- airtableSkill
- asanaSkill
- audio-ttsSkill
- aws-cliSkill
- azure-cliSkill
- bookmarksSkill
- browser-automationSkill
- bundler-analyzeSkill
- calculatorSkill
- calendarSkill
- cargoSkill
- changelog-genSkill
- claude-codeSkill
- clickupSkill
- color-contrastSkill
- crypto-walletSkill
- databaseSkill
- discordSkill
- docker-composeSkill
- dockerSkill
- dora-metricsSkill
- emailSkill
- ffmpegSkill
- filesystemSkill
- gcloudSkill
- githubSkill
- gmailSkill
- gogSkill
- google-calendarSkill
- habitsSkill
- healthSkill
- hubspotSkill
- image-genSkill
- imagemagickSkill
- image-toolsSkill
- jiraSkill
- journalSkill
- kubernetesSkill
- lighthouseSkill
- linearSkill
- locationSkill
- media-configSkill
- meeting-notesSkill
- nginxSkill
- notesSkill
- notionSkill
- obsidianSkill
- ocrSkill
- pandocSkill
- paymentsSkill
- pdf-toolsSkill
- pip-poetrySkill
- pm2Skill
- pomodoroSkill
- project-managerSkill
- qr-codeSkill
- railway-deploySkill
- redis-cliSkill
- release-notesSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

