Replicate to Sharepoint?

I make the content of two of my databases available to my Windows colleagues via Sharepoint. (I proposed the DEVONthink server, but only the Sharepoint environment is possible).

I do this by regularly uploading (via export files/folders) contents of my database to Sharepoint - overwriting what is there. A side benefit is It also ensures my database is always safe as no file deletion in Sharepoint affects my DEVONthink database, and on the next overwrite, Sharepoint is correct again.

However, it is a 15GB overwrite, and between overwrites the data in Sharepoint becomes out of date, so a more regular and quicker process would be ideal.

Is there an option to make this process automatic? I wondered if it was possible to maybe make a “Replicant” of my data, (i.e. replicate the entire folder/file structure in the same database), and then use a script to “Index the Replicant data to Sharepoint” - somehow?

I have no real ability to write scripts, but figured it’s worth asking for ideas.

Note: When referring to process outside DEVONthink, replicant and index don’t really apply.

It may be possible with smart rules.
What contents are you exporting?

It is basically all kinds of files. Documents, images, presentations, video etc.

But what specifically are you exporting?
New files, changed files, …?

I export the entire Folder/Files structure to keep the Sharepoint location the same as my DEVONthink database.

In my DEVONthink database I sometimes add new files, change existing files, or delete files. These files can be anywhere within the folder structure, so an entire overwrite each time is the simplest way to ensure compatibility.

I guess there are date-based rules which could offer some options, but it’s how I ensure they go to the correct folder, and also, how to delete the equivalent Sharepoint files?

A partial solution (which is what I do) is to use the OneDrive app to sync the Sharepoint files to your hard drive, and then index in DT3 the folder created by OneDrive.

That will keep your online Sharepoint in sync with the DT3 database.

It’s only a partial solution because it doesn’t protect the DT database from other Sharepoint users editing/deleting files. I suppose that could be solved by making a copy pf the DT3 database into the OneDrive folder. That should be easily scriptable (not that I know how :smiley: )

I’ll see what I can do with OneDrive and Indexing.

An idea I had was to “replicate” the folder structure in the DEVONthink database. So the database would have two identical folder structures (e.g. A and B)

Then if I could somehow have a script which “auto-synced” only folder structure B to external folder e.g. One Drive.

Then if any file was deleted in OneDrive, it would delete the file in structure B, but would still remain in structure A (i.e. safe from being deleted for the DEVONthink database)

Then a smart group showing anything “is not replicated” would flag these quite easily.

Is this realistic at all?

No, that’s not going to work. You can’t operate on one item in DEVONthink and not affect the replicant.

I understand that changing a replicant changes all instances.

However I am pretty sure that deleting one instance does not delete all other instances - unless you use the “move all instances to trash” command.

So this idea would not protect against changing files, but would protect against accidental deletion.

Is that possible?

However I am pretty sure that deleting one instance does not delete all other instances

That is incorrect (and easily testable). A replicant is not a duplicate. If you remove a file from one group, the file is removed from the replicated group.

replicants

If I make a replicant, or multiple replicants, and delete any one of them, the others remain intact.

Replicate a file - it appears in two locations, italicised in red (my settings)

Delete either of them, and the other remains, but now as a normal file. (i.e. the red italics goes).

Make three replicants, delete one, two remain as replicants with red italics.

You are totally correct this happens when groups are replicated. So my idea won’t work.

However, it is still true that individual files as replicants in non-replicated groups do behave as I described.

You are totally correct this happens when groups are replicated. So my idea won’t work.

Correct - as that’s what you were originally referring to - replicating a group.

However, it is still true that individual files as replicants in non-replicated groups do behave as I described.

Also, correct but now what you were originally referring to :slight_smile:

Hate to drag up this old thread, but this is something of an idea I’ve been toying with.

Sharepoint document libraries can have metadata exposed as a “list” type thing. And files can be nested … kind of like groups and files on devonthink.

To date, I’ve been doing the same thing: quarterly, I overwrite a shared library in sharepoint. It’s inefficient because better than half the files hadn’t changed - just additional metadata or their location changed. So onedrive app for business likes to complain when I do this that I’m deleting a large amount of data, etc.

For my use, there are two main groups: open and closed. In my open group in devonthink, there are usually around 200-300 groups. In each group is an average of 6 PDF files, sometimes up to 40 files. Slowly, each group has files added until and event reconciles the reason for the group, and then that subgroup is moved to Closed. Usually about 25-50 groups are moved into closed quarterly.

I only need to keep the closed groups around in sharepoint for about a year after they’ve been closed.

Sharepoint can take updates to files - including adding/updating metadata by way of API calls … so this part of the process is ripe for applescript.

What’s not clear is how to update the sharepoint files and folders without total deletion each quarter. Sharepoint libraries are exposed as local file and folders in finder through the onedrive for business app. But it seems like it may be easier to manipulate the sharepoint files and folders through API calls instead.

I don’t know myself but I went looking to see if anyone else had conquered this task yet and found this thread where others are encountering the same need: trying to synchronize an external file folder structure based on DT groups. Seems like the only straightforward way is to nuke and rewrite everytime.

Not sure if this helps, as it’s a different scenario.

We have a read only SharePoint folder which is synced to oneDrive on our laptops. All content is made locally available.

Then we index that oneDrive folder into DEVONthink.

I have not tried this, but if you had a read/write folder in SharePoint, then if you add a file into DEVONthink, and then do the “Re-index” command maybe it would update through oneDrive back into Sharepoint?

1 Like

so this part of the process is ripe for applescript.

Not unless there’s a scripting dictionary that supports AppleScripting.