The discourse-sync-base plugin is currently working only with the discourse-sync-to-dropbox and discourse-sync-to-googledrive plugins.
We built new plugins for making a backup to a provider of your choice. All of our plugins follow the same structure and need to be installed together with a synchronizer-base plugin.
The discourse-sync-base
This plugin contains the base class for all other synchronizers. This way we made sure that our other synchronizer plugins follow the same structure and inherit the same methods.
The discourse-sync-to-dropbox
We forked @Falco’s backups-to-dropbox plugin and changed its structure in a way that fits our sync-base. Check out our plugin here if you want to do a backup to dropbox.
Please note that since people with the old version of the dropbox plugin from Falco now have issues, because in his repository the naming didn’t change so the plugin is not loaded in the right order. We will revert our pull request to Falco so that you can still use the old version of the plugin, where you don’t need to install the base class.
The discourse-sync-to-googledrive
If you prefer synchronizing your files to your Google Drive account, we built a plugin for this one too. Learn how to install and use it here.
The discourse-sync-to-nextcloud
Nextcloud is a new cloud tool that works together with several different providers you can pick from. We built a plugin that makes it easy to synchronize your backup files to any of these providers.
We (@Jen_Lijo and @kajatiger) are the team Berlin Diamonds from the Rails Girls Summer of Code. If you want to see more about our approach and the process how we built the plugins, read our posts on meta. We will continue making plugins with other providers. If you have any experience with a good provider for plugins, please give us suggestions what we should work on next.
Totally right. Our next plugin will be for Box and while creating an account for skydrive, I realized that it is called “onedrive” now Thanks for your input!
@eviltrout Perhaps these plugins can be merged into Discourse? Right now we’re only supporting backups uploads to S3 and supporting more providers is definitely a plus to me.
I feel honored that someone wants to merge our plugins, but the question is “why?”. They are no necessary conditions for Discourse and setting up the app is already a big and heavy thing that at least on my local computer runs the tests for almost 15 minutes.
Our plugins should be a nice extra for people who like customizing the usage to their personal needs. Don’t you think so?
PS. @codinghorror We would be very happy about your evaluation and hints on where to optimize our code. Testing has been a painful but good lesson for us so far.
Also the plugins require many gems to support syncing – @tgxworld it would mean installing dozens of gems in core discourse which we don’t want. Let’s let the users pick the providers they want!
Dropbox settings where I clicked to generate the token:
Backup size: 1.7 Gb
I deleted the app created on Dropbox for the deprecated plugin and created a new one for sync-to-dropbox. It seems dropbox does not like that much, because it continues to recreate the old folder.
This evening I’ll try a rebuild to see if it fix this error.
So the plugin creates a folder in dropbox but doesn’t upload the files?
In your logs it looks like the upload_unique_files method is causing the problem…
I will look into it.
Exactly, every time I try to do the manual trigger on sidekiq, the error immediately appears in my log.
The only thing unclear in the instructions is whether the sync-base plugin should be installed on its own (with a rebuild) and only later add the plugins of the various backup services (with another rebuild) or if they can be installed together by activating before the sync-base.
I did the second thing but maybe I was wrong…Please, let me know which of the two methods is the correct one.
I think it makes no difference if you install them both together or individually, but I am not sure. I don’t use vagrant and just manually clone the plugins into my plugins folder…
But for your issue, I think I found the bug. There seems to be a little mistake in this upload_unique_files method because the loop is not handling single elements for some reason, but the whole array. I saw that in the console. I will try to fix it now and push the changes to github and we will see if that fixes your problem.
It was corrected by @AlbertA in original Falco’s post but we didn’t update our repo.
If there was a big file coming, the sync-to-dropbox wasn’t able to handle it because the upload limit of dropbox + chunked_upload method broken.
It’s all good and working now
I agree, I also thought that part of the instructions was a bit ambiguous. Maybe it can be clarified once it’s confirmed to work with simultaneous install?
Documentation will be improved soon. So far, only one backup provider can be installed together with the sync-base. We’ll look into the rebuild matter too, as not being familiar with Discourse we didn’t think about these possibilities!
Another thing that could be clarified is that you also have to activate the sync-base plugin (or perhaps you could make it so that activating the sync-to-dropbox plugin automatically also makes sure the sync-base plugin is activated).