File backup and restore
First, we need to concern ourselves with backing up the moodledata
directory. The most obvious solution is to copy the files over to another server using a tool such as Secure Copy (SCP). However, there are many reasons why we wouldn’t want to do this for a Moodle installation. An important consideration is network efficiency. We can minimize network usage by transmitting only the necessary data. By transferring only the compressed and encrypted changes to files, we can reduce the overall network traffic and optimize transfer speed. Luckily, there are many tools that we can use to support these requirements, and in this section, we’ll explore two of the most well-known Linux-based tools: Rsync and BorgBackup.
We also don’t want to back up files to the same server. Cloud hosting means being able to create new servers at the push of a button, so creating a new backup server will be simple. A backup server doesn’t need to do any work...