Backup Scripts
A backup script represents a single backup process that involves one or more computers and directories. By default, Synco relies on RSync, but there are a variety of different tools available for copying data.
Basic Data Synchronisation
This script will copy data from server1a.example.com to server1b.example.com. Because the method is configured as a data :push
, you will need to run this script on the master server (e.g. :src
) for it to have any effect.
Because this script is modifying system directories, you may need to run it as root. Because backup often involves sensitive files, it is important to consider security when designing a backup policy.
Basic Incremental Backup
This script will copy data from the running server to a sub-directory /backups. The data is first copied using RSync to /backups/latest/$directory where $directory is one of 'etc', 'var', 'srv', 'home'
. Once the data has been copied successfully, the :success
event is fired: lsync-rotate
moves the latest backup to a directory based on the current date and time. Then, lsync-prune
prunes old backups according to the specified policy.