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.
![](/var/linux_magazin/storage/images/issues/2015/180/syncthing/figure-7/658540-1-eng-US/Figure-7_large.png)
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.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.