HowtoForge: Mirror Your Web Site With rsync | Linux Today

HowtoForge: Mirror Your Web Site With rsync

Written By
FT
Falko Timme
May 23, 2006

[ Thanks to Falko
Timme
for this link. ]

“This tutorial shows how you can mirror your web site from your
main web server to a backup server that can take over if the main
server fails. We use the tool rsync for this, and we make it run
through a cron job that checks every x minutes if there is
something to update on the mirror. Thus your backup server should
usually be up to date if it has to take over.

“rsync updates only files that have changed, so you do not need
to transfer 5 GB of data whenever you run rsync. It only mirrors
new/changed files, and it can also delete files from the mirror
that have been deleted on the main server. In addition to that it
can preserve permissions and ownerships of mirrored files and
directories; to preserve the ownerships, we need to run rsync as
root which is what we do here. If permissions and/or ownerships
change on the main server, rsync will also change them on the
backup server…”

Complete
Story

FT

Falko Timme

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.