syncthing | Open Source Continuous File Synchronization

 by   syncthing Go Version: v1.23.5 License: MPL-2.0

kandi X-RAY | syncthing Summary

kandi X-RAY | syncthing Summary

syncthing is a Go library. syncthing has no bugs, it has a Weak Copyleft License and it has medium support. However syncthing has 1 vulnerabilities. You can download it from GitHub.

Open Source Continuous File Synchronization
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              syncthing has a medium active ecosystem.
              It has 52503 star(s) with 3774 fork(s). There are 991 watchers for this library.
              There were 2 major release(s) in the last 12 months.
              There are 310 open issues and 4821 have been closed. On average issues are closed in 22 days. There are 18 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of syncthing is v1.23.5

            kandi-Quality Quality

              syncthing has 0 bugs and 0 code smells.

            kandi-Security Security

              syncthing has 1 vulnerability issues reported (0 critical, 1 high, 0 medium, 0 low).
              syncthing code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              syncthing is licensed under the MPL-2.0 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              syncthing releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.
              It has 122463 lines of code, 5381 functions and 710 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of syncthing
            Get all kandi verified functions for this library.

            syncthing Key Features

            No Key Features are available at this moment for syncthing.

            syncthing Examples and Code Snippets

            No Code Snippets are available at this moment for syncthing.

            Community Discussions

            QUESTION

            Does seafile store synced files anywhere?
            Asked 2022-Jan-21 at 16:55

            I'm using Seafile (on docker) to sync some files to a Synology nas and it is all working correctly. I've created an external folder that is pointed to /shared folder in the container.

            I think I already know the answer, but are the files synced to the server stored 'normally' somewhere? i.e. If I sync a folder called 'photos' and it has 'a.jpg' in it, will I be able to find that file on the seafile server?

            The reason for the question is I would like to backup the original files that are sync'd, rather than having to backup the seafile DB, etc.

            (I am aware that syncthing does what I want, so I may choose to use that instead, just want to confirm my understanding)

            Thanks

            ...

            ANSWER

            Answered 2022-Jan-21 at 16:55
            TLDR;

            No you won't find your a.jpg file on the server. Your files are going to be turned into blocks of bytes.

            To understand

            If you take a look at this part of the documentation of data model

            FS

            There are two types of FS objects, SeafDir Object and Seafile Object. SeafDir Object represents a directory, and Seafile Object represents a file.

            Block

            A file is further divided into blocks with variable lengths. We use Content Defined Chunking algorithm to divide file into blocks. A clear overview of this algorithm can be found at http://pdos.csail.mit.edu/papers/lbfs:sosp01/lbfs.pdf. On average, a block's size is around 1MB.

            So backing up files will won't be as easy as making a raw copy of the seafile drive. As mentioned by @JensV you may still achieve something along those lines using the seafile drive client.

            Source https://stackoverflow.com/questions/70683016

            QUESTION

            How would I configure a dictionary which requires variables in a loop?
            Asked 2021-Oct-25 at 03:34

            I have a docker_container which I want to deploy for multiple users and name traefik routes after the users. But i'm confused on how I can achieve this.

            Here is what I have:

            ...

            ANSWER

            Answered 2021-Oct-25 at 03:34

            It sounds like you need the labels: to be an actual dict since yaml keys are not subject to jinja2 interpolation

            Source https://stackoverflow.com/questions/69702053

            QUESTION

            Cannot retrieve needed files for okteto on Windows behind proxy
            Asked 2021-Sep-13 at 17:28

            I'm trying to deploy okteto environment on Visual Studio Code to use Remote Development on Kubernetes.

            Following the official steps (https://okteto.com/blog/remote-kubernetes-development/), I executed "Okteto: up" and selected manifest(vscode-remote-go/okteto.yml), but got this error:

            ...

            ANSWER

            Answered 2021-Sep-13 at 17:28

            Using a proxy is not currently supported in the Okteto. We're looking into it though.

            For now, a workaround is to manually download the syncthing binary and save it as%HOME%\.okteto\syncthing.exe

            Source https://stackoverflow.com/questions/69157624

            QUESTION

            Novice question about Git versioning for single user/multiple computer
            Asked 2021-Sep-08 at 08:56

            Until now id do versionining with subfolder for each version and sync betwen computers with syncthing. It works but it's easy to do mistake editing wrong version and similar. So I was thinking to switch to some versioning software. Git seems to be capable to do that and much more. But seems that Git offer to much and I can't see correct way to do.

            For example I do make project folder and write .gitignore file with list of files I don't want to be in Git (mostly compiling results) After that I do write some sources and then issue:

            ...

            ANSWER

            Answered 2021-Sep-08 at 06:34
            Creating versions

            Now I have the question when I got some stable code I want to name that as version v1.0. How to do that correctly?

            Git provides tags for this. In order to create a tag, use git tag .

            A tag is basically a name for a specific commit. You can check out (get the code) the tag using git checkout . In order to get the current version of your code again, use git checkout master.

            Syncing

            I do small test and seems that even git repo is synced ok with syncthing. But I wonder that GIT has maybe better way to sync all of my computers. But I don't like to have my code on cloud. How to manage that?

            git allows you to push (upload) your commits to.a git server and pull (download) the commits later.

            The server (use the computer that is running 24/7) can be created by initializing a bare repository In order to do this, navigate to your server and run

            Source https://stackoverflow.com/questions/69097617

            QUESTION

            Difference of FICLONE vs FICLONERANGE vs copy_file_range (for copy-on-write support)
            Asked 2021-Jan-16 at 15:16

            I wonder about an efficient way to copy files (on Linux, on a FS which supports copy-on-write (COW)). Specifically, I want that my implementation uses copy-on-write if possible, but otherwise falls back to other efficient variants. Specifically, I also care about server-side copy (supported by SMB, NFS and others), and also zero-copy (i.e. bypassing the CPU or memory if possible).

            (This question is not really specific to any programming language. It could be C or C++, but also any other like Python, Go or whatever has bindings to the OS syscalls, or has any way to do a syscall. If this is confusing to you, just answer in C.)

            It looks like ioctl_ficlonerange, ioctl_ficlone (i.e. ioctl with FICLONE or FICLONERANGE) support copy-on-write (COW). Specifically FICLONE is used by GNU cp (here, via --reflink).

            Then there is also copy_file_range, which also seems to support COW, and server-side-copy. (LWN about copy_file_range.)

            It sounds as if copy_file_range is more generic (e.g. it supports server-side-copy; not sure if that is supported by FICLONE).

            However, copy_file_range seems to have some issues. E.g. here, Paul Eggert comments:

            [copy_file_range]'s man page says it uses a size_t (not off_t) to count the number of bytes to be copied, which is a strange choice for a file-copying API.

            Are there situations where FICLONE would work better/different than copy_file_range?

            Are there situations where FICLONE would work better/different than FICLONERANGE?

            Specifically, assuming the underlying FS supports this, and assume you want to copy a file. I ask about the support of these functions for the functionality of:

            Are they (FICLONE, FICLONERANGE, copy_file_range) always performing exactly the same operation? (Assuming the underlying FS supports copy-on-write, and/or server-side copy.)

            Or are there situations where it make sense to use copy_file_range instead of FICLONE? (E.g. COW only works with copy_file_range but not with FICLONE. Or the other way around. Or can this never happen?)

            Or formulating the same question differently: Would copy_file_range always be fine, or are there situations where I would want to use FICLONE instead?

            Why does GNU cp use FICLONE and not copy_file_range? (Is there a technical reason, or is this just historic?)

            Related: GNU cp originally did not use reflink by default (see comment by the GNU coreutils maintainer Pádraig Brady). However, that was changed recently (this commit, bug report 24400), i.e. COW behavior is the default now (if possible) (--reflink=auto).

            Related question about Python for COW support.

            Related discussion about FICLONE vs copy_file_range by Python developers. I.e. this seems to be a valid question, and it's not totally clear whether to use FICLONE or copy_file_range.

            Related Syncthing documentation about the choice of methods for copying data between files, and Syncthing issue about copy_file_range and others for efficient file copying, e.g. with COW support. It also suggests that it is not so clear that FICLONE would do the same as copy_file_range, so their solution is to just try all of them, and fallback to the next, in this order: ioctl (with FICLONE), copy_file_range, sendfile, duplicate_extents, standard.

            Related issue by Go developers on the usage of copy_file_range. It sounds as if they agree that copy_file_range is always to be preferred over sendfile.

            (Question copied from here but I don't see how this is too less focused. This question is very focused and asks a very specific thing (whether FICLONE and copy_file_range behave the same), and should be extremely clear. I formulated the question in multiple different ways, to make the question even more clear. This question is also extremely well researched, and should already be very valuable to the community as-is with all the references. I would have been very happy if I would have found such a question by itself, even without answers, when I started researching about the differences between FICLONE and copy_file_range.)

            ...

            ANSWER

            Answered 2020-Dec-31 at 09:15

            See the Linux vfs doc about copy_file_range, remap_file_range, FICLONERANGE, FICLONE and FIDEDUPERANGE.

            Then see vfs_copy_file_range. This first tries to call remap_file_range if possible.

            FICLONE calls ioctl_file_clone (here), and FICLONERANGE calls ioctl_file_clone_range. ioctl_file_clone_range calls the more generic ioctl_file_clone (here). ioctl_file_clone calls vfs_clone_file_range (here). vfs_clone_file_range calls do_clone_file_range and that calls remap_file_range (here).

            I.e. that answers the question. copy_file_range is more generic, and anyway tries to call remap_file_range (i.e. the same as FICLONE/FICLONERANGE) first internally.

            I think the copy_file_range syscall is slightly newer than FICLONE though, i.e. it might be possible that copy_file_range is not available in your kernel but FICLONE is.

            In any case, if copy_file_range is available, it should be the best solution.

            The order done by Syncthing (ioctl (with FICLONE), copy_file_range, sendfile, duplicate_extents, standard) makes sense.

            Source https://stackoverflow.com/questions/65505765

            QUESTION

            Failing OPTIONS request with CORS setup properly
            Asked 2020-Nov-11 at 04:09

            To preface this, I am working on a pull request for Syncthing - a continuous file synchronization software. The pull request will allow for an url to be seen for all connected remote machines from the GUI.

            The problem I am having is the OPTIONS request is failing to the remote machines. Before the program displays an url to the remote machine, the maintainers have requested that that the GUI verifies the machine will allow the user to visit the remote machine GUI (GET request will fail if the machine has set authentication, so verifying an OPTIONS response is good enough). I can verify the CORS is setup properly. I can even send a curl request and go to the remote machine through the browser, but for whatever reason, the javascript OPTIONS request receives a network error. When I look at the remote machine that will respond to the request, no matter curl, javascript, or browser, it's sends a 201 request back. However, when I look into the chrome network console of the machine sending the request, I see the options request fails, but later on, it seems the request succeeds. My intuition was that the request timeout before the machine sends a valid response and retries. Still, after setting a longer options request header, it does not change result as if the timeout duration is not affecting the error.

            This javascript snippet comes from the GUI using angular. It uses angular $http library.

            ...

            ANSWER

            Answered 2020-Nov-11 at 04:09

            Apparently, in order to do a plain OPTIONS request, the server must set header Access-Control-Allow-Methods with OPTIONS. It does not matter when a GET request sends a preflight OPTIONS.

            In case you would like to see the coded solution below https://github.com/syncthing/syncthing/blob/1d3b9876f6f7a4ece0ca31a5abbab45a38aa7d57/lib/api/api.go#L514.

            Source https://stackoverflow.com/questions/64420162

            QUESTION

            Pickle is able to serialize code object in .ipynb, but fails to do it in .py. Why so?
            Asked 2020-Nov-05 at 06:35

            Trying to make my first steps to the marvelous world of Python programming, I stumbled on the very beginning.

            I'm trying to implement a virtual machine for Python bytecode on Python (for educational purposes). So, separating the process of making the bytecode and running it — kind of seems like a good idea. I would like to serialize code objects into files before deserializing and running it in a separated script.

            Here is how the code of serializer looks like:

            ...

            ANSWER

            Answered 2020-Nov-05 at 06:35

            Looks like the answer is found.

            Inquiry revealed, that Jupiter Notebook attaches module ipyparallel.serialize.codeutil to its runtime (ipykernel.codeutil in some versions). And the only thing this module does is allowing you to pickle code objects.

            Thus, to make my initial code work, I should've put import ipyparallel.serialize.codeutil on the top of my script (pip install ipyparallel might also be required).

            Source https://stackoverflow.com/questions/64689413

            QUESTION

            How to sync a software project between computers?
            Asked 2020-Sep-28 at 18:56

            Of course, I'm using git for version control, which also serves (to an extent) to keep different computers in sync. Now consider this scenario: I've been working on some big changes on my computer, but I need to leave and want to continue on my laptop. But the code is broken in its current state; it might not even compile.

            If I'm working all alone with a private repository I guess I could just go ahead and commit the mess to continue the work on my laptop. It does have a bad smell though.

            But if I'm working with a team on the same repository that's a no-go. A branch might save me here, but that still smells like a workaround.

            I've also thought of using a synchronization application like Syncthing, but I'm afraid that two different synchronization applications might bite each other at some point. I wouldn't forgo git when using Syncthing.

            I'm aware that this question will likely not result in one single correct answer. But I think that this a common scenario programmers might face and hope that different ideas on how to deal with it will be considered helpful for the community.

            ...

            ANSWER

            Answered 2020-Sep-28 at 18:13

            As you mentioned in your question, there are several ways in which you can do this.

            Option 1

            The easiest one would be to use git. Create a branch in the repository that sits in your computer, let's call that branch my_feature. Once you have the branch in place:

            • commit and push the changes you have done in your computer, even if they do not work/compile

            Source https://stackoverflow.com/questions/64107053

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install syncthing

            Take a look at the getting started guide. There are a few examples for keeping Syncthing running in the background on your system in the etc directory. There are also several GUI implementations for Windows, Mac and Linux.

            Support

            We'd like to encourage you to vote on issues that matter to you. This helps the team understand what are the biggest pain points for our users, and could potentially influence what is being worked on next.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/syncthing/syncthing.git

          • CLI

            gh repo clone syncthing/syncthing

          • sshUrl

            git@github.com:syncthing/syncthing.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link