I assume you want bidirectional sync (otherwise rsync is perfect if you only need one way sync)? If so, Unison is perfect for your use case. FOSS safe, simple, with cli support.
https://www.cis.upenn.edu/~bcpierce/unison/
It's in most distros as a package.
I've used unison personally. It's a pretty nice tool and does a great job. You can create a profile that sets the synching configuration and options and just run that profile whenever you want. It has a GUI and also has a file system watcher utility so it can autosynch on any change
>Unison
https://www.cis.upenn.edu/~bcpierce/unison/
Is installable via package manager - i have used it for years to sync home/work folders and a few servers for failover
Their documentation (at least a few years ago) didn't really give any guidance for HA, and there's probably quite a few ways you could get it done. I set our instance up with Mysql 2-way replication (master/master) and use unison https://www.cis.upenn.edu/~bcpierce/unison/ to keep the filesystems in sync. I'm using icinga to authenticate with the "live" instance of Jira (via the Atlassian API) to determine whether or not to fail-over.
Does the solution need to handle syncing arbitrary folders, or are you ok with having to keep everything you want to sync in a specific location?
For the former, I use a tool called Unison. I've got it set up to sync a whole bunch of files and folders scattered across my drive. It's a command-line tool, requires some setup, and of course requires a remote-accessible machine to sync to (but any non-cloud solution requires that). And it also is invoked manually rather than automatically synchronizing any changes. But it's the only solution that I know of that handles the case of needing to synchronize a whole bunch of different files/folders without putting them in a central location.
I use unison. It's libre software and works really well. It's simple enough to use and will warn you before you shoot yourself in the foot. It's not real-time, but easy enough to run periodically. (I wouldn't recommend it though, as it wouldn't protect you if you accidentally delete something.)
Give it a try if you're not looking for something with more eye-candy than actual features.
That's exactly what I was about to recommend, unison. As long as there is enough local space on every laptop for everyone's files, and the files themselves aren't too large.
I use Unison. It supports syncing both ways. If file A changes on the desktop and file B changes on the laptop it will push the changes both ways. If file C changed differently on both the desktop and laptop it will ask which way to sync.
I use Unison, which is a FLOSS file-synchronization tool for Unix-like and Windows. It's easy to configure, it has a nice GUI and also a command line tool. It uses ssh, rsh, or just TCP to synchronize.
You can have two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.
Personally I’d always go with rsync, been using it for ~ 20 years on all platforms, but if you really want a GUI there is unison which I’ve also used and it has some nice features including two-way sync (though I think that’s not your use case). It’s also scriptable and Open Source. Haven’t tested on recent macOS versions though.
Tu peux utiliser Unison qui permet de synchroniser et gérer les conflits si tu as modifié des fichiers sur l'un et l'autre ordi. Ça peut se voir comme un rsync qui gère mieux les interruptions et les changements des 2 côtés.
I think honestly the problem is that you made a poor choice in renting your server. It seems like it just doesn't match your needs. And I am confused how you tried Own/Next cloud without being able to install things
With that said, do you have shell access? And do you need it to be automatic or would simple two-way sync on command be fine?
If so, (a) check out Unison.
Or (b) if you don't like that, or can't install things AND you have only macs or linux, PM me and I'll send you an a beta of my own Python-based sync script that I use at work and at home (pretty reliably I may add. I am just waiting to port it to Python3 before releasing it. And it needs to be cleaned up). Again, my script only runs on macs and linux
Follow the 3-2-1 rule - 3 copies, on at least 2 different media, 1 of which is off-site.
Personally, I use Unison for backups/synchronization. I use Unison to keep my files in sync across multiple different drives, so if one goes down I have a complete backup immediately available.
'bup' also looks promising.
If you are running *nix (including OS X) at home, use rsync. If you are running Windows at home, you can still use rsync but it's much harder, if you want something a little easier check out Unison. Another option is Samba + a VPN.
You could also setup an FTP server on your home computer to automatically push new files through it, but make sure you do your research and harden the FTP server.
You'll have a much easier time if your seedbox and computer at home run the same OS. You get many more options if you have everyone running on the same OS (even if both are running Windows).
wow haven't seen anyone mention unison in like 10 years, looks like it started being updated again and even has a corporate site instead of the dead .edu site?
oh no it still has the edu https://www.cis.upenn.edu/\~bcpierce/unison/index.html
Perhaps Unison? "Unlike simple mirroring or backup utilities, Unison can deal with updates to both replicas of a distributed directory structure. Updates that do not conflict are propagated automatically. Conflicting updates are detected and displayed." So, if there is a conflict, you decide which version to keep. That does not completely solve the problem, but it seems to be close if resolve conflicts manually.
If you need something automatic, I'd be pruning the corrupted videos with ffmpeg as the error dectector (e.g., per https://www.reddit.com/r/DataHoarder/comments/bgsgr2/how_to_check_if_a_video_file_is_corrupted/) and detect corrupt images with something like "identify" (e.g., per https://stackoverflow.com/questions/46802866/how-to-detect-if-the-jpg-jpeg-image-file-is-corruptedincomplete). With the corrupted files gone, then rsync (or some other backup tool) could merge the directories with the right options.
You could try Unison: https://www.cis.upenn.edu/~bcpierce/unison/index.html
It can bidirectional sync multiple sources and merge changes.
Either mount the remote hosts file system (ie via smb or davfs) and use it locally or use SSH to connect to the remote host.
I had very good experience with unison (https://www.cis.upenn.edu/~bcpierce/unison/) It's fast even for large file trees and can be configured to do an automatic re-scan every x seconds
We used it to sync webdirs between multiple webservers
You may take a look at Unison [1]
"Unlike simple mirroring or backup utilities, Unison can deal with updates to both replicas of a distributed directory structure. Updates that do not conflict are propagated automatically. Conflicting updates are detected and displayed."
Slightly longer loading times for the bigger ROMs and the inability to play any games if you’re not on the home network (meaning that you can’t pick up your Pi and take it to your mates house) are really the only downsides.
If either of these bother you then you could look at running something like unison which can keep the internal storage on your pi synchronised with the contents of your NAS.
I've been using Unison for about 10 years to sync files between my file server and multiple laptops.
https://www.cis.upenn.edu/~bcpierce/unison/
I literally type "unison" look over what changed where and click "go"
It often takes less than 2 seconds if only a few files have changed.
Sorry if my answer was misleading; the reason I brought up makefiles was just that Vim is already well-integrated with those (either just :make
, or you could reuse any plugin setup you might have for programming that automatically rebuilds a project on save). But other than that, I don't know of any benefits compared to simple bash scripts.
I don't have any experience with it, but you might be interested in Unison for the usecase you describe? It is supposed to do bidirectional sync.
I usually recommend Syncthing, but since you want it on-demand and started from your PC only, that sounds like https://www.cis.upenn.edu/~bcpierce/unison/ would be a better choice for you. It can also recover from interrupted transfers very well.
Well, this isn't a good sign. That's my website and I found this post trying to fix the same problem after it started happening, so I'm not off to a great start.
The only solution I can think of was posted by Adam Shaw in the comments, and that's to use rsync to sync your "real" dev workspaces to the folder that is synced to Dropbox, but that would just be one way. I haven't had time to look at it yet but considered using Unison to do do a bidirectional sync, filtering out things like node_modules. Definitely a hack though and at some point I wonder how useful Dropbox is now vs how I used to use it.
It's also opened up a security risk as the hack I used to use to prevent the .env file from syncing (name a folder ".env", stop syncing it, delete it, then add the file named ".env" in its place") no longer works either, so I have no option but to upload these to the cloud :(
FWIW unison is also what is used in docker-sync to get around the issues with docker and the osx filesystem.
All that said, I am mostly using docker so the node_modules live inside the containers, however when I update the package.json it will create the folder, albeit temporarily so it starts syncing with 100% of the CPU until I remove it again.
TBH I am kind of annoyed and don't have time to work out a solution so I am just going to leave Dropbox off and rely on Time Machine backups for now.
It you look at the website (below), they say "Unison is a file-synchronization tool", and that's exactly what it is.
https://www.cis.upenn.edu/~bcpierce/unison/
The only place where they say "backup" in that page is here: "Unlike simple mirroring or backup utilities, Unison can deal with updates to both replicas of a distributed directory structure. Updates that do not conflict are propagated automatically. Conflicting updates are detected and displayed."
That's certainly a plus for Unison, and why I use it instead of rsync, but for other use cases backup utilities are better, e.g., incremental backups.
I'm using Unison at the moment, which is nice for some things, but I definitely miss rsync. Now that I no longer have any Windows machines in my sync pool, I'm very glad to see this. Hope it makes it into base!
I'm curious about borgbackup, hadn't heard of it before. Is it widely used by this community?
I use Unison to do bidirectional sync between various storage units:
I most often work on my files from my main computer, but can also work directly on the external hard drive when needed (using my old laptop when on holiday, or anything I can borrow to use with my USB boot key).
I have backup units bigger than my main computer storage (2 TiB vs. 1 TiB), as an incentive to not accumulate data that I cannot backup anymore.
Just looking at NAS4FREE's website, it looks like they have 'syncthing' as an installable 'app' (or whatever). So easiest thing to do would be to install syncthing on your old and new nas, set the <whatever> folder on your old nas as syncable (make sure it's set as a 'master' folder for the initial transfer, to ensure nothing weird happens, like your old nas syncing with empty folder on your new nas). Then just start em up and let them sync.
After that you could probably reconfigure your old nas folder as just a regular sync folder. This would mean that anything you place in the corresponding folder on your new nas will be automatically synchronised (i.e. backed up). This can all be done through syncthing's web interface, so no command-line in sight.
EDIT: Although if you have zfs, Balmung's suggestion below sounds like the better option. Man, zfs is magic...
EDIT2: Unison also looks like an option with NAS4Free.
I work on three servers (two in the same building but different sections, one in another state), and keep the raw data synced on all three machines. I don't consider these backups as they're all production machines, but usually the redundancy is enough; I've never had to go beyond this to restore anything. I also sync a subset of this data (excluding the raw sequence data) to my portable external hard drive, so there are essentially four copies.
I use unison to manage the syncing because it uses rsync,but allows me to manually accept or reject every change, as well as easily exclude files or directories with a conf file. I do this rather than a cron job in order to sync while running different analyses on the different machines . It can take a little time to make sure everything is in order with the sync, but I prefer to know exactly what is going on than to blindly run an automated sync.
For true backup, one of the servers (the one I use most often, so tends to have the latest iteration of my analysis) syncs to an external hard drive using rsnapshot, which does incremental backups (every 3 hours, daily, weekly and monthly). I'll swap that drive out every so often and take it home. One of the productions servers also has raid50, but if I ever mess up enough that I need to restore from that, I should probably just quit out of shame.
Unison is a bidirectional sync. I use it to sync my 2 laptops to my server. It will sync updates from both directions. If the same file changed on both sides since the last sync it will ask you which file to use.
https://www.cis.upenn.edu/~bcpierce/unison/
Here is a screenshot.
http://dailypackage.fedorabook.com/uploads/2008-03-04-unison.png
Hey OP, You amy be interested in using Unison, https://www.cis.upenn.edu/~bcpierce/unison/ Notable features are: * Rsync like compression method * File mirroring "Unison can deal with updates to both replicas of a distributed directory structure. Updates that do not conflict are propagated automatically. Conflicting updates are detected and displayed"