Export everything from Alfresco - alfresco

I need to export everything (sites, dashboard, users, groups ecc...) is under my Alfresco ed import all to another Alfresco installation.
I discovered this usefull tool https://github.com/atolcd/alfresco-share-import-export but seems to me that it is good to create an .acp of a site for example but it's not enought for others stuff expecially users.
Please, what's an easy way to export everything from Alfresco ? And then how to import ? Thank you.
I used this Pynthon scripts github.com/wabson/share-import-export but no way an error on the python script execution : C:\Users\xxx\Desktop\Nuova cartella>python export-users.py file.json --username=xxx --password=xxx --url=localhost:8080/share/page/site/xxx/dashboard File "export-users.py", line 5 ^ SyntaxError: invalid syntax
I have Alfresco 5.1 and Pynthon 2.7.12
screenshot

Your url param is incorrect. Use the below one.
python export-users.py file.json --username=admin --password=admin --url=http://localhost:8080/share
This should work for you.
The Share URL should be, http://<IP or systemname>:<portnumber/share, but you've mentioned the one site dashboard url. Please change that.

You can also use alfresco OOTB replication service and replicate all the data from one alfresco instance to second one.

Related

Documentation of Hydra Config

Hydra provides a way to dynamically create a hierarchical configuration by composition and override it through config files and the command line, leveraging OmegaConf. I look for a recommended way to document the parameters but I could not find (a documented) one. What are best practices for that? Coming from argparse, I like the way of documenting the parameter inline, i.e. close to the code.
Excellent question! The answer is: parameter-by-parameter documentation is not yet implemented (as of Hydra v1.1, OmegaConf v2.1).
The future plans are:
in OmegaConf, expose an API allowing users to attach documentation (and other metadata) to each field of a structured config. See this open OmegaConf issue.
Once the above is complete, implement a Hydra feature allowing a parameter-specific help messages to be printed based on the parameter's metadata. See this open Hydra issue.
For now, the best we can do is to customize the general application help message (i.e. the --help command line flag).

Can I run code at Alfresco startup?

I have an Alfresco module that I would like to have do some cleanup when a new version of it is installed.
In the current situation, an older version of the module created a folder node with custom properties at the root of the repository. We've since decided to have multiple such nodes, and none of them at that location. I'd like to put into the next version of the module code that would run at Alfresco startup, check for the existence of the old node, copy its properties into the appropriate new nodes, and delete the old node.
Is such a thing possible? I've looked at the Bootstrap configuration file, but that appears to only allow one to add things to the repository, not modify or delete them.
My suggestion is that you write a patch. That is a class that implements
org.alfresco.repo.admin.patch.AbstractPatch
Then you can do pretty much anything you want on bootstrap (except executing searches against solr since it wont be available).
Add some spring configuration, take a look at the file patch-services-context.xml for inspiration.
Yes you can do that, probably you missed the correct place in the documentation about that:
If you open Import Strategy you'll find a section Per BootstrapView, you should be using something like REPLACE_EXISTING or UPDATE_EXISTING for your ACP packaged content (if you're using ACPs as your bootstrap importing strategy).
Here is a more detailed description of the UUID Bindings values.
Hope that helps.
You can use patches.
When alfresco server starts it applies patches and executes database updates etc.
Definition :
A patch is a piece of Java code that executes once when Alfresco
Content Services starts. Custom patches can be implemented.
Documentation Link

Plone/Grok - In a product built using "zopeskel plone", can grok conflict with plone.directives?

I am trying to build a control panel following a tutorial on the Plone Documentation site.
http://docs.plone.org/develop/plone/functionality/controlpanel.html
However, I started off creating the product with (from the src folder) ../bin/zopeskel plone my.product, instead of creating with the dexterity option. I did select the easy option when it asked what mode I wanted and I did select yes when it asked if I wanted to create a GS Profile.
I made sure to include grok in configure.zcml
<include package="five.grok" />
After following the instructions, I try to run the quickinstall to install the product, but it gives me the error:
ImportError: No module named directives
referring to the line in the settings.py file of their tutorial
from plone.directives import form
I added plone.app.registry to the install_requires bit in the setup.py file, and I made sure to make the changes in the configure.zcml file to include
Just for experimenting, I did add 'plone.app.dexterity' to the install_requires, but I still got the same error.
Is grok conflicting with plone.directives? If so, how can I fix this or do I have to use deterity instead of plone as the option for creating products?
If grok is not conflicting, what could the problem be?
On a side note, the tutorial does appear to be for using dexterity to create the product, but I am not sure if that is what the problem is.
I created a gist with a howto that I wrote for plone.org some time ago:
https://gist.github.com/tisto/4ef1f6c7b445faf6ad73
This is considered best practice these days. Using grok is not recommended any longer.

Symfony2 install ChillDevProxyTemplatingBundle - Cannot import resource

i´ve just installed the ChillDevProxyTemplating Bundle for symfony2, described here:
https://github.com/chilloutdevelopment/ChillDevProxyTemplatingBundle/blob/master/Resources/doc/installation.md
My templates was rennamed correctly by the bundle (from 'default' to 'php'), but when i try to call my controller I get the following error:
Cannot import resource "." from (...)app/cache/dev/assetic/routing.yml". (The following loader(s) are not registered: default).
Has anyone an idea how to fix??
Thanks a lot !
As explained here: https://github.com/chilloutdevelopment/ChillDevFileManagerBundle/issues/27
You might just need to install ChillDevViewHelpersBundle to get it working.
I previously added answer to this question, but it was removed by moderator since my reputation was not high enough to post a comment.
But now thanks to support of community I was able to investigate this problem:
https://github.com/chilloutdevelopment/ChillDevProxyTemplatingBundle/issues/2
It's now fixed :). Thank you for pointing the problem.
The problem was, that Assetic, in dev environment tries to parse all the templates based on templating engine name so it needs loader for each templating engine - of course for "default" there was no loader and thus caused an exception.

Upload Image file using Symfony2 without guessers?

I am using Symfony2 framework for one of my project. In this one, I want to upload an image. This is really easy to do so while following the Symfony2's cookbook. It works very well on my local machine. But when I put the whole application on my remote server (Planethoster.net shared hosting), it doesn't work because of the Type-Mime extension guessers. In fact, they are not enable on their servers... (phpinfo shows --disable-fileinfo)
So, basically the idea is to know if there is a solution to do the same action (uploading an image) without any extension guessers?
Thanks
What do you think of filtering the filename ? With the last three characters, you'll know the extension. Check out UploadedFile, there is a getClientOriginalName() method. What I would do is to explode it by the ., fetch the second entry of the resulting array, and then parse it to do what you want to do.
Would you like an example of code ?
To fix exception while uploading file using framework Symfony 2
Unable to guess the mime type as no guessers are available.
enable PHP extension php_fileinfo, to do this find your php.ini file and uncomment following line
; windows
extension=php_fileinfo.dll
or
; linux
extension=php_fileinfo.so

Resources