Solved 20 views

How do you write a fast automated backup script in Linux using the rsync utility terminal command?

I want to mirror my public asset upload folders from a production Laravel server over to a secondary secure storage backup server automatically every night without re-copying unchanged files. What flags maintain incremental syncs?

W
WebRunner
asked 1mo ago · 10 rep

1 Answer(s)

0
Utilize the rsync command equipped with standard compression archive and human-readable flags: rsync -avz --delete /var/www/uploads/ user@backupserver:/remote/backup/dir/. The --delete flag ensures files removed from your main server are cleaned from backups keeping folders identical.
S
SysAdminPro answered 1mo ago

Your Answer