Ask Slashdot: How Best To Synchronize Projects Between Shared Drive and PCs?
Koookiemonster writes "Our company has many projects, each one with a folder on a Samba drive (Z:\). Our problem is syncing only the programmers' current projects (~30 at any time) between Z:\ and their C:\Projects\-folder on five Windows 7 laptops. If we sync the whole Z:\-drive, our projects folders would be filled with too many subfolders, making it difficult to navigate. The folders contain OpenPCS projects (PLC) and related files (Word, Excel, PDF documents); a common project folder is 50 MB. Is there any easy to use, low-budget sync software with scripting, so that we could e.g. only sync folders that exist locally?" (Read more details, below, of what Koookiemonster is looking for.)
"Many programs do support selective sync, but choosing what to sync is awkward; projects and who works on them change daily. It is important that subscribing to a project is as easy as copying it from Z:\ to C:\projects\. The Z:\-folder with all of our current and past projects is located on a desktop PC running Ubuntu Linux. It can share files e.g. via Samba or FTP. All PCs are on the same (W)LAN. Off-site backups of Z:\ are taken care of via rsync. The company has three programmers, who usually handle their own projects alone, but very often others need to add files to projects. Bigger projects need more programmers. Currently we use FreeFileSync with a custom piece of Javascript to make batch files that synchronize e.g. folders C:\projects\123_ProjectName\ and Z:\123_ProjectName\ if the local folder exists. However, that solution lacks versioning, real-time sync and deletion support. It only syncs when we press a button, and then older files are overwritten by newer files (two way sync; older files go to a "sync-deletions"-folder).
PS. Bonus points for solutions that allow renaming project folders without renaming them on all laptops."
PS. Bonus points for solutions that allow renaming project folders without renaming them on all laptops."
I don't know if this will do everything you need, but I have been using it at home to backup three machines to my NAS. Seems to work quite well.
you are welcome
What about using GIT? (or other similar versioning tools)
https://owncloud.org/
Keep the masters in a private cloud and sync to it from your PCs. Git and other multi-user SVN is an idea, too. Also, SharePoint is excellent (but lots of overhead).
[RIAA] says its concern is artists. That's true, in just the sense that a cattle rancher is concerned about its cattle.
This sounds like the ramblings of someone who has never heard of revision control.
USE VERSION CONTROL!!!!
Git
Mercurial
Perforce
Subversion
Vesta
CVS
ClearCase
VSS
StarTeam
The choices are legion. What you are doing is not a choice.
Pick a version control system and your life will be much easier (after the learning curve).
Git is all you need
Not sure if he is trolling, or if he has deeper issues that can't be solved with version control systems like git or hg (or even good 'ol CVS!).
Maybe you should give your team the Joel Test. I think you want source code control. Maybe subversion or git?
Sounds exactly like what an RCS like Subversion is good for.
Each user pulls down the directories relevant to him/her from the overall repository, updates at will from the central source, and pushes up changes at will with a couple of mouse clicks.
TortoiseSVN will even give you handy little icons on your local folders in Explorer to tell you if what you have in your local directory isn't synced with the central server, and it's two clicks to make that happen. I actually think you don't want to "force synchronization" on an ongoing basis, seems like a great way to overwrite a lot of your developers' (and others') ongoing work.
~ Whence do you come, slayer of men, or where are you going, conqueror of space?
We used to use ViceVersa Pro to sync our team but eventually moved over to Plastic SCM which has been friggin' awesome. It not only supports code, but also art assets. Plus it has the best support for branching. One team can be working on a branch specific to one project, while another works on a second branch while the main trunk stays clean and build-able. You can even have developers run their own local repository on their desktop/laptop and have them replicate/merge either on a schedule or when they connect to the LAN (if they work offsite alot).
You only bring stuff back to the main trunk when you're ready to merge a branch back in. You can even merge branches separate from the trunk. We check everything into it, code, art, and our Doxygen output. It's been a time save on orders of magnitude.
Not trying to be a sales pitch, but you should check it out.
I like your idea, but it needs some pizzazz. I think if you make a thousand chimps on teletypes write the scripts you'll get the effect you want.
lose != loose
Syncing files like this is a mess. Perhaps you should look beyond share drives. You are trying to solve the technical problem, but if you step back you might see a business problem. Consider 3 alternative approaches:
1) Keep the files on the share drive and do not mirror them locally.
2) Use a source control system (Ex: GIT, TFS, Subversion)
3) Use a groupware / content management system / document management system. ( Ex: Sharepoint, Confluence, QDMS, Lotus Notes, Microsoft Exchange, Drupal, SAP, Groupwise)
Knowing the right terms helps find the software you need. Here are some links to Wikipedia which has the right terms, and some lists of software:
http://en.wikipedia.org/wiki/Content_Management_Systems
http://en.wikipedia.org/wiki/Document_management
http://en.wikipedia.org/wiki/List_of_collaborative_software#Comparison_of_notable_software
Windows Sync Center http://windows.microsoft.com/en-us/windows-vista/sync-center-frequently-asked-questions/ is a functioning offline file sync built into the OS since Vista with other capabilities coming in as early as Windows 95/NT4. Good to know that you just don't care and can't be bothered to add a suggestion, though.
You have programmers. You have multiple projects. They might be working offline. For this, you really need a Distributed Source Control system such as git or mercurial. I personally recommend mercurial as it's got good Windows tools (TortoiseHg and HgScc for Visual Studio integration). You can put your "pure" repository on your share, then have the programmers push to it -- or, better yet, have an "incoming" for each project to which anyone can push, then a "pure" to which only project leads have write access and into which they can push approved versions.
If, for some reason, you simply can't run source control, Windows offers Offline Files functionality that can sync individual folders if you set them up correctly. What this means is that you need to ditch this "shared drive" concept and set up your file shares correctly -- by which I mean having multiple shares, one for each project. Users then connect to the share in question and choose to make it offline, or you create drive maps and enforce offline files using group policy.
The Freelance Wizard
If you hire experienced, competent programmers, they will be able to solve this issue for you. First they will suggest using version control (it seems frighteningly likely from your writeup that you're not currently using it). Probably git, but there are other good ones.
At that point the problem will become redefined. What you want is a script that:
- Iterates through the local working directory.
- Finds project folders that are NOT being worked on, and are also currently clean (no uncommitted files), and deletes them.
- Finds projects that need to be there and aren't, and git-clones them.
A competent programmer can write a script like this. And beyond that, for many reasons it should be the programmer's responsibility to commit stuff day to day. Also you may want to switch to a text file documentation format to eliminate merge conflicts in binary files (Word, Excel). Maybe you wanted a different answer, but I'd like to think that you're on the wrong site for that.
Robocopy ( http://technet.microsoft.com/en-us/library/cc733145.aspx ) is included in all desktop versions of Windows (so, not RT or Phone). Extensive copying/moving/mirroring options, CLI-only. Great for integrating into scheduled scripts.
I'd still agree with other poster here, and recommend git over Robocopy to the OP. However, Windows does have a robust tool for syncing files between multiple computers built in.
In fact, Robocopy has been available since Windows NT 4.0.
It's sad to see an entire team of supposedly "professional" developers which have never heard of version control.
You can't even blame it on the Windows environment -- MSVS supports hooks for several version control systems either natively or through plugins/addons.
This whole story just reeks of some manager saying "We can't afford to set that up -- it would take too much time" any time someone has suggested it.
Because I flat out refuse to believe the entire team doesn't know any better.
I do not fail; I succeed at finding out what does not work.
If you don't want to do Version Control as others have suggested then I recommend Super Flexible File Synchronizer. It is a great product with lots of options in regards to what does and does not get sync'd. It is inexpensive to boot. http://www.superflexible.com/ftp.htm
I suggest finding the person who says you can't use version control, and locking him in a room until he either changes his mind or ceases to be a problem. Then, use version control.
http://www.rsnapshot.org/howto/
Well, actually probably rsync will be sufficient for your needs. And rsnapshot is probably a little more than your needs. I suppose that only thing you need to configure is a rsync server on windows, a nice writeup you will find here: http://www.stillnetstudios.com/snapshot-backups-howto/
I recently used this to configure my wife's windows PC, so that it will work with rsnapshot, and backup all her projects. After configuring rsync server on windows, the rsync operation works seamlessly. Whether you will use just rsync, or complement it with rsnapshot is up to you.
#
#\ @ ? Colonize Mars
#
You said you have programmers working on these projects. They probably each have their own preferred way to do this, why not ask them? If they can't come to a consensus, you could have them write their own solution.
Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
You are welcome :)
Having no need for Windows, I really don't keep up with its capabilities. But, really, this is the year 2013 --- Windows is still that pathetic, that basic tasks like syncing files between multiple computers take special software that doesn't just come with the OS? Why is anyone still using that crap? Are corporations really so utterly incompetent on IT issues that they'd put up with shit like this because they don't know any better?
Dude, even on Linux, you need special software to synch files (rsync, git, whatever.) Since file synching is an app-specific functionality, this is not a OS problem. This is an operator problem, and I've seen Linux/Unix sysadmins doing the same kind of crap job as the one described in the original question/article/whatever.
This is a solved problem on both Windows or Linux/Unix. But incompetent IT staff exists on both domains. You can't defensively program against stupid (nor should you.)
Use Git.
"I'm a contractor. I have a team of carpenters who are tasked with building a house. It seems this is going to require the driving of a large number of nails. My team of carpenters would like to know what sort of tool or mechanism would work best to drive these nails. Right now, we have one guy who holds the nail while another guy hits it with his thermos. This does eventually drive in the nail, but 90% of the time the nail bends, and it's denting our thermoses. I wonder if there exists some genius, super-carpenter bad-ass out there who might be able to suggest a better way."
I second git. git scales badly with large files. If this is a problem, you could have a look at git-annex http://git-annex.branchable.com/ The concept needs some time to grasp, but it's really powerfull.
Git is absolutely not a good first version control system for people who are clueless about version control. (Such as, evidently, your developers).
Git requires prior experience with at least two simpler version control systems. In git, you often run into scenarios that require you to understand its complicated repository representation so that you can choose the best steps to unravel them, based on understanding the ramifications of each approach.
The implementation of git is not hidden from the user behind a robust set of "no brainer" use cases.
The decentralized model alone will confuse the heck out of workers with no prior version control experience.
Use a system that has a centralized server from which working copies are checked out, like Subversion.
SVN or Git for code repository. Easy to set up, lots of windows and linux tools, command line based even if you want that.
However for documentation, i recommend confluence, or the many free wiki based collaborative solutions. This allows people to post on a wikipedia like site their documents. They become automatically searchable, people can collaborate in the documentation with version control built in. Confluence allows you to drag and drop ppt, import and export word documents, drop excel files in there or anything else it recognizes. The idea of single user word documents and passing around outdated versions is old and retarded.
The obvious "Use Version control/Git" is actually and improvement of your methods.
Here is an actual to the point answer to your question about software. A requirement of real time-sync was mention.
There is Synkron (has a scheduler) , OneSync (has real time sync), and Unison (uses rsync).
All are open source and free. Have fun.
Entia non sunt multiplicanda praeter necessitatem.
Sparkleshare (http://sparkleshare.org/) is a "transparent" front end for Git which turns it into a simple file sharing tool. This would probably be appropriate for most of the actual "file sharing" applications the OP mentions (gaining many of the advantages of Git while keeping the complexity hidden until its needed), while obviously any source code fprojects should find their way into some kind of version control repository, probably Git as well, with TortoiseGit (http://code.google.com/p/tortoisegit/) being a fairly compelling solution for a Windows shop.
The learning curve isn't particularly steep here, an hour or less should bring someone up to a functional level with Git, and even though it does have a little trouble working with binaries effectively, particularly large ones, but that's a problem common to most version control systems. git-annex (http://git-annex.branchable.com/) might provide a serviceable workaround for large binary "assets", depending on your workflow, but I haven't used it myself.
EMC Syncplicity. Note: I am the desktop client lead.
No, I will not work for your startup
You might want to checkout git-annex: http://git-annex.branchable.com/
It handles the idea of larger repositories with disconnected parts. You get git versioning of files and the ability to replicate portions of the data at will.
The developers at my company, who use windows laptops, keep a lot of their code in VisualSVN server and then use eitherAnkhsvn to do the checkout straight into Visual Studio, or TortoiseSVN if you want to be able to right-click in any folder and checkout to that location.
Battlemaster--Game with friends in medival realms
http://www.goodsync.com/
Works like a charm, with directory-level sync control, and automatic resync on a schedule, if you want.
I see Git and SVN mentioned a lot, in positive and negative sense. I would suggest Mercurial, but is better than SVN (i.e. distributed) but easier to use for most SVN people than Git.
I agree that a VCS is the best choice, as suggested above. If, for some reason, you don't want to use that (eg: too many binary files grow you repo too much), unison is a great choice. It uses rsync to sync files, and keeps track of which files where modified on which side.
"But why 'sync' stuff at all? Why not work directly on the file server (Z: in this case)? Why mess with 'local' files that will even need synchronization?"
Because that way each developer would step on each other's toe. I bet that when working on an idea they still go renaming their files like foo.1, foo.2, etc. and that more or less fortnightly if not more frequently there are discussions on why you didn't ask me about file bar, now you have overwritten it with your own incompatible version.
This people is discovering source code managing principles at their own pace.
I'd say they are more or less at the level of RCS days.
Agreed. And it only takes a minute ore two to set up.
As long as the system allows for concurrent deployment of multiple processes, multiple installation paths, and doesn't start services as daemons on conflicting ports, you can have hordes of developers on the same development server. This doesn't typically work well for OS, embedded, or resource intensive development projects, but it's a breeze for web projects and some basic application development. Still, this is 2013, and it costs less to get someone setup with a company laptop than it does to give them health insurance. The only reason to lock people into centralized development machines instead of a portable is about physical control of the source code, and that is an employer's prerogative if they so choose.
There are use cases for multiple systems, and sharp companies make use of as many of these systems to fill their niches as they need. Put up a source code management system like rcs/cvs/svn/git/mercurial/bazaar/sourcesafe/bitkeeper/etc. If you need a whiteboard area for people to track projects, requirements, milestones, and other cultural information that's good for employees to know, slap together a wiki. If you need a dumping ground for large amounts of junk media files and other random crap (this litters SCM and bloats on disk storage if it exceeds a certain threshold), then set up a shared Z: or H: drive by all means, but don't expect it to facilitate shared development on curated central libraries unless it's just temporary transferring files when a merge is too complicated. If you want to go the microsoft route and give thousands and millions to a software vendor, then do so by all means.
No tool is a golden hammer. No tool is the best for every job. If you try to make one tool do everything, you're setting yourself up for failure. Listen to other people and be willing to go along with solutions that you may personally resist at first if they give you confidence to believe they know what they're talking about (or they're signing your paychecks).
I'm curious about a couple of things. Of course pretty much everyone here is screaming "source control" But how is that you have a programmer working on THIRTY projects at one time? Perhaps I'm misunderstanding your use of "project" but I think I would go crazy if I was trying to juggle thirty different projects. Perhaps some sort of consolidation is in order.
You also mention if you sync the whole thing, navigation would be a problem with too many subfolders. A good source control will help alleviate this issue as a programmer could only checkout a portion of the system. But I think you have a bigger problem to solve if you have too many subfolders. Perhaps you need to solve your project hierarchy.
Seriously, learn to use it.
Problem solved.
Yes, SAMBA supports it.
Right click on the share, tell it to keep offline files or whatever. Then your users just use the Z drive regardless of when and where. When not connected the share, the cached copy works, when connected to the share, you're editing/locking the share's files.
Conflicts can happen, and you will be warned when they do. If thats a problem, you need a proper CVS (concurrent versioning system, not the actual CVS software specifically) I'd suggest cvsnt or subversion myself as they are simple to use for basic stuff. GIT is too techie for all but the most distributed of distributed geeks.
Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
Seriously, only amateurs mess around with network shared and synced folders. Get yourself a revision control and source repository system. There are plenty to chose from. Take a look at Subversion or Mercurial to get started. Synced folders are link flint knives and bearskins. You need to up your game.
No offense, but StackOverflow...
Are SCM/VCS really such a hard thing to find out about that it deserves a Slashdot headline??
I've been using the pro version of allwaysync (http://www.allwaysync.com) to do this kind of thing.
You can use regex to define which folders to use, does autosync, deletions etc...
I was going to potentially suggest it but saw you already use it.
FreeFileSync HAS batch files that can run and you can always schedule jobs (at login, connection with server, etc). You can customize the sync and even use versioning. It supports names of drives instead of letters as well...
Anyway, I'll add to the voices that said that you need to use some sort of Source Control for projects. Even if it's only to be able to 'blame'.
"Science can amuse and fascinate us all, but it is engineering that changes the world. " - Asimov.
We have a network-attached storage drive, a Linux server and several developers using Windows laptops and a few fixed PCs. While it's possible to run Subversion (SVN) directly on the NAS, we run it on the Linux box for which we had already set up a secure tunnel method of access from outside. The Linux SVN repository is simply a link to the real repository on the NAS (which is RAIDed and also backed up more frequently). We run TortiseSVN on the PCs, both fixed and laptops. As others noted, developers only need to pull in the projects they need to their PCs. This is working really well, no hiccups at all and free to use. We've used CVS, Git and a few others and found this gave the best tradeoff of features and complexity for what we do. YMMV.