rsync

Technical Notes

These notes are my personal online notebook of useful commands and "how-to's". You are welcome to make use of them if you find them helpful. They obviously don't come with any warranty! Click on one of the category tags above for the notes in any category.

Linux Backup solutions

Some resources for setting up backups:

Comparisons

Duplicity

Rsync

  • Main resources

Drupal backup script

First it is necessary to create a backup user on the database which has (only) read access to everything. This is because its password will be embedded in the backup script which reduces security. This can be done with:

BKUSR=backup
BKPW=backuppassword
BKDIR=/var/www/dbbackup
mkdir -p $BKDIR
echo "GRANT SELECT, LOCK TABLES ON *.* TO '$BKUSR'@'localhost' IDENTIFIED BY '$BKPW'; FLUSH PRIVILEGES;" | mysql -u root -p

In the backup script, first some variables are set up

BKUSR=backup
BKPW=backuppassword
BKDIR=/var/www/dbbackup
SITE=cfaw.info

Cygwin installation

.Cygwin Install

SSH/SCP without a password

Here are some links:

Zimbra backup using LVM and rsync

rsync backup

-can use alternate ports, e.g.:
rsync -avz --stats --progress -e "ssh -p 1234 -o CheckHostIP=no" root@sv.cfaw.info:/backups/cfa.net .

Here are some rsync links:
-Fairly recent tutorial: http://www.fredshack.com/docs/rsync.html
-Snapshot-type backups using hard links: http://www.mikerubel.org/computers/rsync_snapshots/

Syndicate content