Synchronizing data between computers and mobile devices using Syncthing
Node Network
After you have transmitted the settings to all the nodes involved, the next step is to introduce the devices to one another. The 46-digit individual device ID that was generated from the information in the certificate for each device when it was first launched is used for this purpose; it can be accessed via the Show ID sub-item.
You can transmit this ID either in the form of a text file using a USB flash drive, load it using a smartphone and a barcode scanner (Figure 4), or distribute it by email or various other web services. Then, enter the ID in Syncthing's front end via the Add Device button together with the previously specified device name. Using the Introducer option in the Edit Node dialog, choose whether all nodes that are entered on the distribution system should also be used on the new device.
Using the ID and the unique device name, you can now keep data on your devices in sync and share content with colleagues and friends. You can configure the Syncthing GTK graphical interface in the UI Settings window via the Syncthing icon at the top left. There, you can, among other things, integrate the service into the file manager in Gnome, Cinnamon, or Mate.
Adding More Directories
When it's first started, Syncthing creates the ~/Sync
folder in the home directory of each device by default. It automatically incorporates all files stored here and recursively all contained subdirectories, including their contents, in the data synchronization. However, when larger volumes of data need to be synchronized, you can add further folders with their own settings to the Syncthing configuration.
After clicking Add Folder or Add Shared Folder from the Syncthing GTK menu (Figure 5), enter the folder's unique name in the dialog for Folder ID and then navigate to the target directory. The directory must be set up on all computers, and the ID must be identical. The respective target directory can, however, have a different name on each device.
The Folder Master option stands out among the other settings. If you enable this setting, Syncthing protects the corresponding folder against changes made on other devices. However, Syncthing still transfers changes made on this device to the rest of the network. A file only disappears from other devices once it has been deleted in one of the protected folders.
The Search Interval option (Rescan Interval in current versions of the application) determines how often Syncthing searches for new or changed data. You can, by all means, extend the predefined rest period of 60 seconds on inefficient systems. If necessary, load all directories concerned by clicking Check All (Rescan All) at any time.
Syncthing provides different modes for creating and organizing backups of data managed using Syncthing under the File Versioning item [11]. Depending on your needs, you can either completely forgo backups or use a Simple versioning in which Syncthing keeps a fixed number of copies of deleted or changed files in the hidden directory .stversions
. Even the expiration date for versioned copies can be determined in the Staggered versioning variety. An external command writes the backup copy for external versioning.
If the data for the added folder is on a filesystem with no administrative rights (e.g., FAT), you can make sure that the changes to file permissions fall by the wayside using the Ignore Permissions option. Next, select the Syncthing devices with which this directory will be synchronized in Share With Devices. If necessary, you can exclude subdirectories from synchronization using the menu item Ignore Patterns. After sharing the new folder, you need to confirm the integration of the connected computers (Figure 6).
Android App
The Syncthing Android app (Figure 7) is still in the early stages of development; however, it can already be used in a meaningful way. The app innately enables the folder where the smartphone or tablet camera stores images. As with the desktop counterpart, the app also shares further directories with the Syncthing network as needed. The configuration is analogous to the PC version. Additionally, the app offers the option to become active only when WiFi is available or when the cellphone is charging.
The app's power hungriness is one of its greatest weakness. If the mobile phone is set up to search constantly for changes and synchronize new data (Figure 8), Syncthing remains active the whole time, meaning that the smartphone used in the test heated up significantly and the battery life degraded noticeably. It is therefore advisable to launch Syncthing only when it is needed, instead of running the daemon in the background.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.