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.