Solved 1 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 5d ago · 10 rep

1 Answer(s)

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

Your Answer