Using rsync for incremental backup
2
I'm hosting a page and have ssh-access to the webspace. The site allows modification by it's users. To be able to revert it back to an older state, I thought about rsync to create an incremental backup every 30 minutes using cron to launch the following script. #!/bin/bash # Binaries RSYNC=`which rsync` LN=`which ln` MKDIR=`which mkdir` #TODO: Is this enough to make the script distro independent? # Other Variables source="<username>@<provider>:<workspace path>" target="<local backup path>" # Date ... year=$(date +%Y) month=$(date +%m) day=$(date +%d) # ... and time hour=$(date +%H) minute=$(date +%M) # Prepare directories $MKDIR -p $target/$year/$month/$day/"$hour"_"$minute"/ # TODO: Why is this necessary? The actual