Replacing a empty dropbox's (fresh install) folder with a previously (uptodate) dropbox folder. Is it possible? - backup

I am about to install Maverick and before I do that I am going to reformat my macbook air. I use dropbox and have about 15gb of (small) files on it (mainly documents/ebooks).
My question is: Is it possible to backup my Dropbox folder now, reformat my SSD and and install dropbox again. After wish I replace the dropbox folder with my backup without getting Dropbox confused (It might think it are new files? So dropbox could upload them or/and download the same files again).
Does anyone got any experience with this?

It's fine to do this - I have done it myself, but not on OSX.
The Dropbox client will index the files that it finds on your computer and compare them to the ones which are already in your account (on the server). I believe that it uses some kind of hash function to do this - the client creates a small hash value for each file and then this value is compared to the value on the server. If the value is the same then the client assumes that the file is the same and it does not need to be re-uploaded. However, if you have thousands of files, this can take some time.
Source: https://www.dropbox.com/help/1941/en - "The application will index the files and see that they are the same files in your account."
If you want to do it, when you install Dropbox again, you should sign-in to your account, let it create the Dropbox folder and then click "Pause Syncing" so that it doesn't start downloading everything. Then you should copy the backed-up Dropbox files into the new Dropbox folder and resume syncing.

Related

macOS check if file is available offline (gdrive, dropbox, one drive, nexcloud)

When iterating over files I must check whether or not the file is available offline if the drive is a virtual drive, for example.
When working with GDrive's "stream files" feature, files in the finder are either considered to be "available offline" or "online only". The very same feature exists for other cloud storage provider such as OneDrive, nextcloud, and dropbox. For my application, checking the state before accessing the file is super important to not trigger an unintentional download of the files through the virtual drive driver.
On windows, things are simple by checking the FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS and FILE_ATTRIBUTE_RECALL_ON_OPEN file attributes.
On Mac, I fail to find an equivalent but for iCloud. I am checking all kinds of attributes through the NSFileManager attributesOfItemAtPath dictionary as well as the NSURL resourceValues
On OneDrive, it seems to do the trick to simply check if NSURLFileAllocatedSizeKey is zero. GDrive however, seems to cache the data at some place and always reports NSURLFileAllocatedSizeKey to be zero, even though the file is made available offline.
Clearly, there must be a tag / flag / attribute to query from the file system, right?

What will happen if storage of local machine is smaller than dropbox storage

Let's assume I have a dropbox pro account which gives 1TB of storage & the storage is fully occupied with data.If my local machine storage is less than 1 TB, can anyone please explain me about the behavior of "my local dropbox folder"?
I know that all data cannot be downloaded to my desktop(local dropbox folder)due to lack of storage.I have following questions
1.What will happen if I access a file which is not there in local dropbox folder. Will it be downloaded?
Which files are stores locally out of all the files in cloud storage.
Does dropbox consider about file access patterns?
Thank you in advance
Can't access a file which is not there in local dropbox folder.
No, Dropbox has an option called "selective sync" - user determines which folders should be in local out of all the folders. If your local storage is not sufficient it gives a message stating that.

Smart local copy of a remote directory

Currently I have a bunch of local copies of dev/production websites. Each copy contains the "files" directory, which contains files uploaded by site users. Currently I use rsync to synchronize the directories contents from remote servers (via ssh).
There are some annoyances:
I have to run rsync manually each time when I want fresh files (this could be automated of course, but as I have a lot of website copies, it's not a good idea).
The rsync execution takes some time.
Disc space on my laptop is running out.
I think all of this could be solved if there is some kind of a software that can work like a proxy:
When I list files, it requests the file list from the remote server and caches the results for some (configurable) time.
When I first time request file contents, it retrieves the remote file and saves it locally.
When I update a file, it only gets updated locally.
When I save a new file in the "files" directory, it not goes to the remote server.
Of course, the logic of such software should be much more complex, but I hope, my idea is clear: don't waste disk space, download files on demand, no remote changes.
Is there any software that works like that?
Map a network drive with NFS or sshfs. Make local copies if you really need a file.
I did not mention it in the question, but I needed this for work with Drupal. And now I have found a Drupal-only solution, the Stage File Proxy module.
It does exactly what I need: downloads files from a remote server only when they are requested.

Why does Dropbox break my Drupal site?

I'm using Apache 2.4 on Ubuntu 14.04 and Drupal 7. I wanted an easy remote backup for my Drupal site, so I tried putting it in Dropbox. Then, something happened, and Apache started giving 403 errors ("You don't have permission to access / on this server.") for the site.
I recovered from an old backup, but I still can't figure out what happened. I diffed the Dropbox directory and the backup, and they're the same. I reset all the permissions in the Dropbox directory to match the backup, but the version in Dropbox still won't work. I also tried copying the files from the Dropbox directory into the location of the backup, and that still didn't work.
I'm a bit at a loss as to what went wrong. Does anyone have ideas as to what Dropbox might have broken?
Rather than trying to run the site from a Dropbox location, why not just make Dropbox the repository for backups?
Try this:
https://www.drupal.org/project/backup_migrate_dropbox
This will also backup your database which you didn't mention as part of your Dropbox backup strategy.
Or you could run a cron task to run incremental backups via rsync to the Dropbox folder (Assuming you have already gone through getting Dropbox connected any syncing with Ubuntu). I use the process documented at this location and it has worked perfectly on a number of different web servers:
http://hadzimahmutovic.com/rsnapshot-mysql/rsnapshot-backing-mysql-databases

Display list files and folder using Mediafire API

I tryed to use Mediafire API, but when I use Folder, get_info, it doesn't return file & folder array like the example.
Full url I used: http://www.mediafire.com/api/folder/get_info.php?folder_key=l461cm2d8hfxd
What's wrong with my attempt? Thank you.
You can try the MediaFire API PHP Library. This class currently implements all the functions in the Mediafire API.
Ok I just took a look at their API documentation. They've updated the get_info function for the folders. They've taken out the file tree....
So if you are uploading via the dropbox (which doesn't return the quickkey associated with the file), you CAN NEVER dropbox upload and then use the api to find the file and download it. This renders their API as useless as tits on a boar hog.
The point of a dropbox is to allow remote uploads to a folder, you then know the folder key so you can query the API and return the document quickkeys that are in the folder which then allows you to manage those files remotely, move, delete, download etc. Now you cannot do this FAIL FAIL FAIL.
Despite the Functionality of get_info not working, folder search can resolve at least some issues with retrieving quick keys. In my case i searched for ".mp3" and was handed all the mp3s in my folder