
Automatic backups with grsync archive#
If you want to fully backup all data listed above every time, you can compose a bash script to archive all files using Linux tar command and then send ( scp) the tarball to the backup location. Second, fully backup or incremental backup? You may have other utilities or service data scattered in other directories which need to be backed up, think carefully and find them out before you take action. Include this directory in your backup list. /var/lib/mysql: This is the directory for holding the database data.


Automatic backups with grsync how to#
Combinding these two commands, we can setup a light-weight and effective backup solution.ĭue to the difference of Linux distributions, in this article, we use CentOS/Redhat system as an example to introduce how to setup up the backup plan. The rsync command is a ideal tool for copying and synchronizing files and directories to a remote computer, while the crontab command is used to schedule jobs to be executed periodically. Though most cloud server providers have backup or snapshot services (usually not free), it’s better to have your own backup plan. To set up a Linux server, sometime you don’t actually need a physical server, subscribing a VPS from Linode, DigitalOcean or Amazon could be a better choice. I personally likes Linux system much more than Windows Server, not only because Linux is free, but you get better performance and more powerful tools on Linux. Linux servers are widely used by lots of companies for hosting their websites, databases, or other services.
