2

I use Dropbox but also like to back up my files to an external hard drive. I am currently doing a one way sync from Dropbox to the external drive every hour. This is very inefficient as the application rechecks all the checksums each time. However, I do this as I don't understand what Dropbox does if you copy a large file to it and then half way through the copying try to copy the file to a backup.

In my set up, I copy the files to my Dropbox folder in location A, and then copy the files from the Dropbox folder in location B to the external hard drive. So Dropbox is basically used as a way to transfer the files to nearer the external hard drive.

Is there a safe and guaranteed way of backing up Dropbox files that doesn't suffer from this sort of possible race condition?


Further clarification: The question is if Dropbox updates the local copies atomically (using locks or renaming or some other trick) and preserves file attributes. However, I believe (now that someone told me) that attributes such as modified time, created time etc. are not carried over between machines.

To be clear, this is not a question about uploading or how Dropbox handles updates on its servers. This is only a question about downloading and whether there is any time period when the local copy of a file is incomplete or inconsistent. The only sensible way I can see to avoid inconsistency would be if a copy is made of a local file that is being modified, the copy is changed, the old copy deleted and the new copy renamed. Is that actually what happens? If the file is very large this has obvious space problems so I don't know if they do it.

6
  • There are many tools that exist that will allow to sync two folders under specific conditions. I suggest you use one of those tools to do this. These tools will allow you to verify the checksums are actually different before the job is performed which prevents the situation you are concerned about.
    – Ramhound
    Feb 1, 2013 at 12:56
  • @Ramhound This is what I do at the moment but it means that it is rechecking every single file on both sides each time which is slow.
    – Simd
    Feb 1, 2013 at 13:09
  • Except...The files are local so the scan should be fast. The program I use only updates files that were changed since the last run of the job.
    – Ramhound
    Feb 1, 2013 at 13:32
  • How do you stop it from copying half synched files? I mean large files which dropbox is in the process of downloading to your dropbox folder.
    – Simd
    Feb 1, 2013 at 13:37
  • If you mean files I have placed in the folder and Dropbox starts to upload to my account which are then modified, this isn't really a problem, since I designed my job to run once every single day. This allows any file to be fully uploaded to my account and only after its complete do I update the file.
    – Ramhound
    Feb 1, 2013 at 13:45

2 Answers 2

0

You shouldn't do any damage, since Dropbox is first of all a folder on your local hard drive. This folder can then sync with the online Dropbox server, but if you back it up on an external drive before it has finished backing it up online, there is no problem, since the file is already complete on your local drive.

14
  • In my case I copy the files to my dropbox folder in location A, and then copy the files from the dropbox folder in location B to the hard drive. This is the possible problem.
    – Simd
    Feb 1, 2013 at 12:33
  • I see. In this case, if I understand correctly, if you copy the file to the hard drive from the dropbox folder b, then it means that the file has already finished uploading on dropbox servers, so your data should already be synced. Does this make sense to you? Feb 1, 2013 at 12:36
  • Right so that's the question. Can a large file ever be in the dropbox folder at location b half copied? Because I am copying from the local drive/dropbox folder at location B to the external drive.
    – Simd
    Feb 1, 2013 at 12:38
  • Not that I know. The only thing that can be "half copied" is a folder, if you copy it before all the files in it have been synced. But in the case of a unique, large file, then I think there is no problem :) Feb 1, 2013 at 12:39
  • This is great if true but... :) It seems hard to imagine how a 1GB file could just appear instantly in your local dropbox folder. Unless there is some clever locking mechanism.
    – Simd
    Feb 1, 2013 at 12:43
0

It seems that dropbox does download a file into cache and then after it is completely downloaded it then copies and deletes the old version locally. Attributes such as modified time, created time etc are not carried over between machines but the local "last modified" date on the windows machine will do to see what has changed. This is enough to let a standard backup utility to its work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .