📜 ⬆️ ⬇️

Synchronizing: recipes for working on multiple computers

Recently I faced the following task: there are three computers at home and it happens on each of them to work. At the same time, I wanted to forget once and for all about the need to manually synchronize files between computers. The computer at work also wanted to be included in the synchronization process. But at the same time to decide how to make the synchronization of the communicator independent of a specific computer.
The resulting solution is described in the form of recipes.

Sync bookmarks


I'll start with the simplest. To sync bookmarks in Firefox, I use the Xmarks plugin (formerly Foxmarks). I use it for a long time and everyone is happy. Put from here .

Sync communicator


A little thought, I realized that I only need to synchronize the calendar. The rest of the information is enough to back up. Therefore, the solution was very simple - I started using Google Calendar, I installed Google Calendar Sync on each computer, and I installed OggSync on my device.
Google Calendar Sync downloads from here .
OggSync is downloaded from here .
BonusOn home computers, I installed Google Calendar Sync not only under my account, but also under my wife's account, and also set it up for my calendar. Now my wife can watch my calendar in her outluke and add reminders for me. Immediately it became easier to synchronize our plans.

Synchronize information between computers


And now about the most interesting. So, it was necessary for me to have a single set of working files on all of my computers, and synchronization would occur reliably and with my minimum participation. It also requires that files from the work computer get to home computers, but not vice versa - personal information should remain at home.
I quickly rejected the option with synchronization over the network - the bandwidth is too small, and I don’t want to depend on whether the laptop is connected to my home LAN. Thus, the only option left is to use an external drive.

Choosing a drive

The drive must meet the following requirements: make full use of the bandwidth of the USB 2.0 interface; have a decent amount of "with stock"; be compact and impact resistant; be inexpensive.
As a result, I chose the Transcend StoreJet 25 mobile 250gb .
')
Encrypted

To encrypt data on the drive, I used the TrueCrypt utility. Everything is set up in a similar way with recommendations from a recently run article .
There is a nuance in the fact that now we are going to encrypt not a flash drive, but a much larger hard disk. You can do this with TrueCrypt in the following ways:

As a result, I chose the first option, although the third one also looks interesting.
At this stage, you need to be patient - formatting the TrueCrypt data file will take more than two hours.

Choose a program to synchronize

As is usually the case, the synchronization program that I got with the drive was uninstalled shortly after the first launch. The inability to handle the fact of deleting a file is not its only drawback.
When choosing a synchronization program, I stopped at GoodSync. I liked this program because:

GoodSync is downloaded from here .
BonusI recently messed up when installing plugins under Eclipse. Launched in recovery mode from the GoodSync backup, the folder with the eclipse returned to a working state.

Customize file structure

Here, of course, a variety of options is possible. I did as follows.
On each home computer, I had a folder “d: \ roaming_home”, containing the folders “apps”, “books”, “home”, “work” and others. Accordingly, the folder “d: \ roaming_work” appeared on the working computer.
GoodSync was configured to synchronize the “roaming_home” and “roaming_work” folders with the drive when starting at home and synchronize “roaming_work” when starting at work.

We put software

All the necessary programs, primarily capable of working without installation and allowing to set the location of the settings, were reinstalled in the “roaming_home \ apps” folder (for example, firefox and, in a separate folder, the profile for it). Distributions of some programs that are not able to work without installation were placed on the drive, and the programs themselves were reinstalled on each computer.
GoodSync runs from the drive and is not installed on any of the computers. It is also true with TrueCrypt, but unlike GoodSync it is located on the unencrypted part of the drive.

A special case

One of my home computers is a tablet netbook that I’m not going to program. In addition, there is no “d:” disk on it. For him, I created a separate GoodSync config, which refers to “c: \ roaming_home”, and added to the exceptions the “roaming_home \ apps \ dev” folder. In order for other programs from “apps” to work properly, a “d:” disk is “created” by a batch file added to the autorun:
subst d: c:\

Finishing touches

It remains to write a few batch file. The first is autostart.bat and unmount.bat, which will mount and unmount the TrueCrypt disk. In addition to mounting the TrueCrypt disk, I added to autostart.bat the opening of the explorer window on the root directory of the drive — the batch files in this directory will play the role of the menu.
Go to Computer Management-> Disk Management and assign the drive letter “v:” to the drive. In the TrueCrypt startup parameters, assign the letter “w:” to the encrypted disk.
Fix the autorun.inf that generated TrueCrypt. Since on many computers Autorun is turned off, we write two more mount.bat and dismount.bat batch files:
v:
cd v:\
call v:\autorun.bat

These batch files are placed on the desktop and somewhere in the unencrypted part of the drive, so that they are at hand.
We write batch file to run GoodSync. I have four of them: “home synchronization”, “home synchronization with netbook”, “synchronization at work”, “GoodSync launch without automatic synchronization start”. These batch file have the following form:
w:
cd W:\roaming-home\apps\tools\GoodSync
call goodsync.bat /miniwin sync TranscendSync-Work

The settings for GoodSync are in its own directory, and the batch file for running it looks like this:
start GoodSync.exe /profile=data /lf=logs /check-new-ver=no /cleanup-logs=yes %*
BonusThanks to installing most of the necessary programs on the drive, I can now work at all on any suitable computer without spending time transferring data and setting up the environment. It is enough to connect a disk and start synchronization.

Summarize


So, the script works as follows.
  1. I connected the drive to the computer.
  2. Caused mount.bat from the desktop (or waited for Autorun to trigger).
  3. Entered the password TrueCrypt.
  4. I called the necessary batch file for synchronization (synchronization takes several minutes).
  5. Checked the results of GoodSync.
  6. Worked. Closed all synchronized programs.
  7. Called the desired batch file to synchronize.
  8. Called unmount.bat.
  9. Closed the explorer window with the v: \ disk.
  10. Safely disconnected the drive and disconnected it from the computer.

I consider the task formulated at the beginning of the article as completely solved and very pleased with the result. It is no longer necessary to remember all the time on which computer the file I need resides. And now you can at any time stop work on one computer and calmly continue it on another. In addition to mobility, I received backup of my data to several independent carriers at once.

Alternatively, you can try to work directly with a portable drive, then you can not wait until the synchronization takes place. Or try out the “median” version, in which only those data are synchronized for which the reference speed is important. On the other hand, I often work without connecting the drive to a computer. GoodSync correctly performs multi-directional synchronization, and its interface makes it quite convenient to handle conflicting changes.

Source: https://habr.com/ru/post/56970/


All Articles