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
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs