tar -czf backup-$(date +%Y%m%d).tar.gz /data

Category: Self-Hosting

tar -czf backup-$(date +%Y%m%d).tar.gz /data

Create a dated gzip-compressed tarball of a directory — a simple scheduled backup pattern

Creates a compressed archive with today's date in the filename (e.g. backup-20260414.tar.gz). Schedule this in cron for daily backups.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.