Sure, I'll translate this for you.
SiYuan Note is a local-first personal knowledge management system that supports complete offline use, effectively ensuring data privacy. However, this also means users are primarily responsible for their data. If the local storage medium encounters risks, data loss or damage is unavoidable. Fortunately, SiYuan Note also supports end-to-end encrypted synchronization, which ensures privacy while allowing for synchronized backups, adding an extra layer of protection for our data.
Since its launch, the encrypted synchronization feature of SiYuan Note has not been without its challenges. As a user who started using it in the fall of 2021, I remember the early forums were filled with posts about lost, damaged, and difficult-to-use synchronization issues, with some complaining quite harshly. Personally, I didn't encounter these issues because my usage environment was relatively simple, primarily syncing between a desktop and a laptop. However, other users had a poor experience. Fortunately, the two developers have been actively listening to user feedback and continuously optimizing the data synchronization experience. They even opened up the only paid third-party synchronization configuration. Currently, the possibility of encountering sync issues is very low.
In SiYuan Note version 2.8.6, the developers introduced an important feature: on-demand download of cloud snapshots. Supporting on-demand download of cloud data snapshots is a critical improvement as it allows users to download cloud data snapshots from any device at any point in time, providing an extra layer of data security. Previously, data snapshots, unless marked by the user, only existed on the local machine. With version 2.8.6, each synchronization snapshot will be saved as a cloud snapshot with the device name marked. If local data encounters issues, users can restore snapshots from other devices, ensuring data safety. This makes the likelihood of data loss in SiYuan Note very low. More often, the remaining issues are unexpected data synchronization conflicts, which can be effectively avoided by understanding synchronization principles and maintaining good usage habits.
I. What You Need to Know Before Syncing
1.1. What is synced?
First, it is essential to understand that SiYuan Note's synchronization refers to keeping the data in the workspace/data/ folder consistent across multiple devices, including resource files, templates, widgets, and notebook data. It does not include themes, icons, or keyboard shortcuts settings.
1.2. The Principle of Synchronization
Next, it is important to understand the synchronization principle. Being a local-first note-taking application, SiYuan Note differs from cloud-first applications. According to the official documentation, the synchronization principle of SiYuan Note is as follows:
Note:
- Symbolic links and hidden files will not be included in snapshots.
- If a notebook or note is set to be ignored in the file, it will not generate a data snapshot.
If this is difficult to understand, remember that SiYuan Note's synchronization is sequential; multiple devices cannot synchronize simultaneously. Here’s an example using my common scenario:
- Edit on the company laptop and synchronize (via automatic or manual trigger), covering the cloud data with the laptop data and generating a cloud data snapshot, ensuring the cloud and the laptop data are consistent.
- Returning home, synchronize on the desktop, covering the desktop data with the cloud data, making the desktop, cloud, and company laptop data consistent.
- Edit new content on the desktop and synchronize again, updating the cloud data to be consistent with the new desktop data.
- The next day, at the office, synchronize on the company laptop, making it consistent with the updated cloud and home desktop data.
In this scenario, synchronization alternates between the laptop and desktop, ensuring the process completes as expected. However, conflicts may arise in the following scenario:
- Edit file a on the company laptop and synchronize, generating cloud snapshot 1.
- Open SiYuan Note on the mobile (or another device) and edit file a without first synchronizing.
- SiYuan detects a conflict between cloud snapshot 1 and the mobile data, prioritizes the mobile data, generating a cloud snapshot 2 with the merge notation, and creates a historic file of the previous laptop data on the mobile.
- If the company laptop is set to auto-sync within a short interval, it will take snapshot 2 as the latest data and cover local data, generating conflict documents on the laptop.
In summary, avoid synchronizing on two devices simultaneously or within a short interval (tens of seconds). Use alternating synchronization! Here’s a developer’s statement to emphasize:
Notes:
- Synchronization will not trigger in sleep or shutdown scenarios; use the manual sync button.
- On mobile, auto or manual sync will execute sync when switching to the background (but not on complete manual sync). However, directly killing the background process will not complete the sync; manually click the sync button in advance.
- Symbolic links and hidden files will not be synced.
1.3. Synchronization Methods
Finally, note that the synchronization discussed here includes official or officially supported third-party synchronization over S3 or WebDAV protocols. Simply, it refers to sync settings available in SiYuan Note via Settings→ Cloud.
Author: mozhu
Link: ld246.com/article/1683395267749
Source: ChainDroplet
License: CC BY-SA 4.0