Previously, we talked about how to access FileMaker on Linux. In this article, we'll review how to integrate FileMaker Linux Server with cloud-based storage options like AWS, Backblaze, Dropbox, or even a LAN-based drive so that we can easily access it from our app of choice.
In this example, we're going to use Backblaze for our storage service, but connecting to any others should follow a very similar path. We're going to set up a systematic process that syncs the contents of a backup folder on our FileMaker server with a bucket on Backblaze.
The first thing we need to do is connect to our FileMaker Server via an SSH client. This step differs slightly by the operating system. On Windows 10, enable the SSH client using Apps and Features. macOS users can go ahead and open the Terminal app. Regardless of the client, our command to log in will look similar to this:
Once we've logged in, we'll need to install the program we're going to use to sync the local backup folder with the Backblaze bucket. For this example, we're using an app called Rclone. If you issue the following commands in this order, it should install itself:
Now that we have Rclone installed, we need to configure it to hook up to our Backblaze bucket, but first, let's get some required info from Backblaze. To configure Rclone, we will need to get two things from our Backblaze account, the Account ID and the Application ID:
With these two keys, we can configure Rclone to list file contents, create buckets, copy data to buckets and even sync to remote locations. Now let's configure Rclone.
To create a new remote, select the "n" option and then enter a name.
Select a service, in our example "5" for Backblaze.
Enter your Application Key ID and Application Key.
Do you want to delete files on the remote drive or hide them? If you want the remote drive to match your local drive (sync), type "true."
Save your new "remote" by typing "y."
This ends the configuration of the remote called BackblazeTest. Next, we need to make a folder that we'll sync to on the remote drive using Rclone. The convention is the name of remote + colon (:) + name of new directory/folder.
Now let's try it out by issuing the following command. It will sync our FileMaker Server backup folder to the remote folder. Incidentally, we could also perform a copy by substituting the word "copy" for "sync."
Now that we tested it let's schedule it using Linux's scheduling tool called Cron. For Cron to be able to run the Rclone config, we need to create a shell script containing the above command and make it executable using the "chmod" command.
"ctrl + o" to save it
"ctrl + x" to close Nano
After creating the script, we can schedule it by adding it to the Crontab file (go to https://crontab.guru for help with formatting) with the same text editor, Nano. We typically schedule the script to run an hour or so after our FileMaker Server scheduled backup to make sure that it completes successfully.
"ctrl + o" to save it
"ctrl + x" to close Nano
Using these tools and examples, we have a head start in making the apps hosted on our FileMaker Servers easily accessible from our favorite cloud-based or LAN drive just in case of an emergency or even for the sake of convenience.
Be sure to check out our series of articles on how to optimize FileMaker Server performance.
This article is also published on FileMakerProGurus.com.