Friday, March 18, 2011

Automatically backup hard disk data across multiple Dropbox accounts

While in College, one of the least liked things was submitting our journals for "correction" [read: professor tick marking alternate pages of the journal, while looking up & talking to the other professor sitting on the adjacent table doing something similar]. We invariably ended up writing pages after unending pages of hurriedly written experiments and assignment reports, copied from someone who had finished it a day early after finding a senior who had photocopied a [his] previous years journal to complete his own submission the previous year and had now handed the year-old photocopy to the friend, in which half the words had begun to start fading. It was the most unproductive time-wasting activity we had to undertake every 6 months for the 25 marks allotted for our journals. Diagrams were a different issue though - loved drawing them.

Now with no more hurriedly filed journals to submit, actually missing that activity a bit. So, in order to re-create the mood of filling up journal pages half-asleep in an handwriting I myself wouldn't be able to read the next day, I 've decided to write this post in the format resembling that of a journal write-up. Also has a little bit of the hurried element thrown in for good effect.

Note: If you can afford it, then please do consider using their paid service. Also, if a free user, then do not create more than one account for yourself. The second account created for this post was only to demonstrate the ability to achieve stated aim - purely academic reasons. Would be very unfortunate, if the good folks at Dropbox have to wind up their service due to user abuse.

---------------------------------------------------------------------------------------------------------------------------------------

Aim:

To set up an arrangement that will automatically backup a file or complete folder from the hard disk to multiple Dropbox accounts.

Apparatus:

  • 2 or more Dropbox accounts

If you haven't yet got them, then please sign up here [referral].

  • Windows operating system - Windows XP onwards [Windows 7, Windows Vista including Windows XP etc.]
  • A computer [duh!]

Assumption:

  • The partitions on the hard disk are in NTFS. FAT partitions can not be used to set up this arrangement.

Procedure:

The procedure can be broadly divided into 2 parts:

  1. Installing and running multiple instances of the Dropbox software
  2. Syncing files and folders so that they are backed up across multiple Dropbox accounts.

 

1. Installing and running multiple instances of the Dropbox software

  • For this experiment, we shall back up our data to 2 Dropbox accounts. Hence we need to install two instances of the Dropbox software on our computer.
  • Thus, in order to install 2 instances of the software, we would be requiring 2 user accounts.
  • If you have already created two user accounts, then you may jump to the section titled, "Running multiple instances of the Dropbox software simultaneously". Else, read on if you want to know how to create user accounts.
  • Creating multiple user accounts in Windows 7 & [possibly] Windows Vista

Automatically backup Hard Disk across multiple Dropbox account

Visit the Control Panel & select the User Accounts option.

Automatically backup Hard Disk across multiple Dropbox account

Once there, select the Manage another account option.

20110314-Hard-Disk-backup-multiple-Dropbox-account-03

Next, click on the Create a new account option.

Automatically backup Hard Disk across multiple Dropbox account

Then you can create the new account. The account can be a Standard user account. No need to create an Administrator account. Here, Dropbox User is the name of the new account created.

Automatically backup Hard Disk across multiple Dropbox account

Once done you will see the newly created account in the list of user accounts.

Automatically backup Hard Disk across multiple Dropbox account

Important: You must assign this new account a password.

Once the new account has been created and the password assigned, log out of your existing account and log into the new account [Dropbox User, in my case]

Once logged in, install a copy of the Dropbox software on the hard disk. Since the new account created is a Standard user account, you will be asked to enter the administrator password to the install the software.

When you are asked to select the destination where the Dropbox folder is to be created, select a location that has an NTFS partition.

Click on the thumbnails to view larger-sized images

Automatically backup Hard Disk across multiple Dropbox account Automatically backup Hard Disk across multiple Dropbox account

As you can see, in my case, I have selected the L: drive for creating the Dropbox folder.

Once done, you may log out of this account and log back into the original [SD, in my case] account. Install another instance of the Dropbox software here too. Again the destination where you create your Dropbox folder must have an NTFS partition.

20110314-Hard-Disk-backup-multiple-Dropbox-account-09

Here, the destination of the second [actually the first, since I've been using this account since long] Dropbox folder as shown is F:\Downloads.

  • Running multiple instances of the Dropbox software simultaneously

Here, as I always log into my SD user account, the Dropbox account installed while logged in as that user name will start up automatically.

The task, now, is to start the Dropbox software that I had earlier installed while logged in under the Dropbox User account.

In order to do so, create a shortcut on the desktop, with the following as the target location [assuming your C: drive is the one where your OS has been installed. If you've installed it some place else, you'd probably know the path of the file for which a shortcut needs to be created :)],

Automatically backup Hard Disk across multiple Dropbox account

Alternately, you may copy-paste the following into that box [including the quotes]

"C:\Users\Dropbox User\AppData\Roaming\Dropbox\bin\Dropbox.exe"

Once done, a shortcut shall be created on your desktop.

Invoke the context menu associated with that shortcut [usually done by right-clicking on the shortcut] & select the Properties option.

In the Target box, add the following string at the start of whatever is already present in that box,

runas /user:username

20110314-Hard-Disk-backup-multiple-Dropbox-account-11

If, as in my case, the user name is made up of 2 words, then you will need to enter them within double inverted commas. Else the double inverted commas are not to be used. Thus by doing so, each time I click on the shortcut, I can start a second instance of Dropbox under the Dropbox User username, even while I am logged in as the SD user.

Each time you click on the shortcut, you will be prompted for the user password associated with that account. After you enter the correct password, your second instance of the Dropbox account too shall start. If you do not wish to enter the password each time, then, as shown in the picture you may append the /savecred operator to the earlier line that we had added. You may copy-paste the following into the target box.

runas /user:username /savecred

However, please note that the /savecred switch is not recognised in Windows 7 Home Edition & Windows 7 Starter Edition [& possibly the corresponding Windows Vista editions]. Even if added, it shall be ignored without harming your arrangement & you will be asked to enter the password each time. Also note that there needs to be a gap equal to one spacebar click between the appended string in the Target box and the content originally present there.

If you wish for the second instance of Dropbox to start automatically each time you log in, then you must copy this shortcut into the startup folder. It location is normally as follows,

C:\Users\SD\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\

20110314-Hard-Disk-backup-multiple-Dropbox-account-13

Where SD must be replaced by the appropriate user name under which you want the second instance to start on your computer.

Now as you can see, I will have 2 instances of Dropbox starting up each time I log into my SD user account.

Automatically backup Hard Disk across multiple Dropbox account

Alternately, instead of creating a shortcut on the desktop and then sending it to the Startup folder, you may directly create the shortcut in the startup folder and proceed as instructed. I have not done it that way, but don't see why it wouldn't work.

Thus, as you may have realised, in order to run more instances of Dropbox simultaneously, you would need more user account. Number of simultaneous instances of Dropbox = number of user accounts.

HT Semi-Legitimate

2. Syncing files and folders so that they are backed up across multiple Dropbox accounts.

20110314-Hard-Disk-backup-multiple-Dropbox-account-15

  • Right-click on it and select the Pick Link Source option.

20110314-Hard-Disk-backup-multiple-Dropbox-account-14

  • Now navigate to one of the Dropbox account folders where you wish to backup the existing folder [Source2, in my case] & select the [Drop as > Junction] option.

20110314-Hard-Disk-backup-multiple-Dropbox-account-16

  • Thus now a folder named Source2 will also be created in the Dropbox folder account along with the content present in the original Source2 folder. Any change you make to files and folders in either one of the Source2 folder [either the original or the one inside the Dropbox folder] will automatically get reflected across the other Source2 folder. These files and folders will correspondingly also get synced to your online Dropbox account.
  • Similarly, any change you make to the files in your online Dropbox account [add, delete, modify] will get synced and reflected across the folders on your hard disk.
  • In order to sync the files across multiple Dropbox account, follow the instructions given, starting 5 bullets above [Pick Link Source > Drop as > Junction]. The only difference being that now you must execute the [Drop As.... > Junction option] in the Dropbox folder of a different account.
  • Thus now, you have created an arrangement where by your data from the hard disk will be synced across multiple Dropbox account and you can modify them at any one location & it will get updated across the others.
  • You can, in fact, sync & backup multiple folders from your hard disk to your Dropbox account
  • If you wish to sync a file & not a complete folder, as was done previously, the procedure to be followed is the same, except that in the Drop As... option you may select the Drop Symbolic Link option or Hard Link [if available] option instead.

20110314-Hard-Disk-backup-multiple-Dropbox-account-17

  • Even without the Dropbox account, using the Link Shell Extension, you can create automatic backup & syncing of multiple files & folders across Hard Disk partitions. Even within the same partition, you can save the same file or folder at different locations. It would like a RAID 1 arrangement for selected files and folders. You can also use it to mirror a complete drive too [not yet tried it though] using Link Shell Extension.
  • Read through the entire Link Shell Extension documentation, a software which is actually a front-end GUI for features already present in Windows OS that support the NTFS partition, and see what sync & backup arrangement suits you the best. Currently, I am using the arrangement as described above. Will keep you updated if I make changes.

Observations:

  • The changes made to files and folders are instantly synced across all folders [original folder & Dropbox account folder on the HDD] on the hard disk. Occasionally, it may so happen that these changes may not be reflected at that very moment in your online Dropbox account. This can be resolved by simply logging off that windows session & logging back in as the same user or the next time you restart your computer, they will also be shown to have been updated in your online account.
  • Similarly if you make changes to a file through one of the online Dropbox account, they are immediately synced across all the folders on the hard disk. However, the same file may not get synced instantly in the online account of the other Dropbox account. This issues too can be resolved, as described above, by logging off & then logging back in or the next time your computer is restarted.

Result:

We have successfully set up an arrangement that will back up your hard disk data across multiple Dropbox account.

Conclusion:

Hence proved.

[okay, it sounds illogical, but in absence of being able to draw any coherent conclusion after performing an experiment, this was what we invariably ended up writing in the journals :D]

Godspeed