aspentaya.blogg.se

Automatic backups with grsync
Automatic backups with grsync







  1. Automatic backups with grsync how to#
  2. Automatic backups with grsync archive#

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

  • /var/spool/mail: This is where the mail data is located, and definitely should be backed up.
  • Rather than backing up the whole /home directory, putting only specific sub-directories, such as /home/someone/gitdata, /home/anotherone/documents into your backup list would be a better choice. It is just meaningless to backup these data. However, there is a problem: There are lots of cache data, log files, download software, or history records located in this directory.
  • /home directory: This is the location for personal user data of all accounts (except root), and obviously, the backup plan should cover this directory.
  • And since the total size of this directory is usually no more than 50 Megabyte, it would not hurt to back up the whole directory.
  • /etc directory: Though some files in this directory don’t need to backup, I wouldn’t bother to pick them out.
  • Here are several directories that need to be taken care of: It is generally not necessary to backup data such as Linux system files, installed software. Generally, we only need to backup data important to us, like website pages, databases, configuration files and personal data. However, before that, here are several questions to think about:

    automatic backups with grsync

    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.









    Automatic backups with grsync