Retrieve all documents version list in alfresco - alfresco

Need to fetch list of all documents version.
Is there a way to do this with SQL.
Also , In a folder , can we find which subfolders have versioned documents in them ?
Thanks

Related

GCloud deleting all documents within an Index via Gcloud or within App Engine Admin console

I have a search index with several documents. I can delete using the python documentation here https://cloud.google.com/appengine/training/fts_adv/lesson3, however I was curious as to if anyone knows a way to do it via gcloud or the admin console?
I have tried via the gcloud datastore indexes cleanup command. and generated a index.yaml file following directons via:https://cloud.google.com/datastore/docs/tools/indexconfig, but it does not clear the documents away like the delete method does within python.
I didnt think the datastore one would work, for it lives within the appengine, so I am thinking i am looking in the wrong place so any help would be much appreciated! ^_^
There is no gcloud command that will allow you to delete the documents on Datastore. There are only commands to delete the indexes or the operations which you can find over here.
If you are using Datastore of Firestore in Datastore mode, you can use a Dataflow job to delete a bulk of entities. There are some template jobs that you can use to do this as mentioned in this document.
If you want to delete a document from Firestore in Native mode, you would need to do so through the delete() method as mentioned in the documentation, nevertheless, you would need to keep in mind that deleting a document does not delete any subcollection, you would need to retrieve the documents and subcollections in order to delete them manually as expressed here.
Hope you find this useful.

Alfresco conent store deletion

I have conentstore configured in below content store location.
D:\alfresco-content-services\alf_data\contentstore**2019**
I want to delete above shown 2019 folder under conentstore. I dont need 2019 anymore. Basically purging .
If i delete files above folder ,will it clean-up the metadata and indexes also ?
or will it corrupt my respository ? Whats the best way to achive mass deletion , which will delete references in database also without corrupting repo ?
Thanks & Regards
Brijesh
If you delete any folder from the content store, it will not affect the database (and hence the indexes) in any way. You will end up with nodes referencing .bin files that do not exist anymore, though.
Note, if that folder is the first year in your content store, then it also contains some files used by Alfresco to determine if the content store matches the database. Depending on this, if you delete the folder - you will mess up Alfresco (repository will not start if it does not find those files).
Mass deletion in general is tricky, I'd suggest using Bulk Import Tool's delete web script that does this as fast as possible (avoids audit logs, recycle bin, etc).

Extract Aflresco documents from command line

I would like to know if it is possible to access the documents that Alfresco keeps. I want to make a project to generate a zip for each user registered automatically.
Thanks

How to delete all files starting with "foo" in Firebase Storage

I have a long list of files in Firebase Storage, which I have uploaded from a python script.
Many of those files have this kind of names:
foo_8346gr.msb
foo_8333ys.msb
foo_134as.mbb
...
I know there is no programmatic way to delete a folder in Storage (they are not even folders), but how could I remove all files starting with "foo_" programmatically, from python?
You can use Cloud Storage List API to find all files with a certain prefix, then delete them. That page has code samples for a variety of languages, including Python. Here's how you list files with a prefix:
storage_client = storage.Client()
bucket = storage_client.get_bucket(bucket_name)
blobs = bucket.list_blobs(prefix=prefix, delimiter=delimiter)
print('Blobs:')
for blob in blobs:
print(blob.name)
if delimiter:
print('Prefixes:')
for prefix in blobs.prefixes:
print(prefix)
You will have to add the bit of code that deletes the file if you believe it should be deleted. The documentation goes into more detail about the List API.
Firebase provides a wrapper around Cloud Storage that allows you to directly access the files in storage from the client, and that secures access to those files. Firebase does not provide a Python SDK for accessing these files, but since it is built around Google Cloud Storage, you can use the GCP SDK for Python to do so.
There is no API to do a wildcard delete in there, but you can simply list all files with a specific prefix, and then delete them one by one. For an example of this, see the answer here: How to delete GCS folder from Python?

Alfresco Repo Side working on Document Upload

I would like to understand how does the Alfresco Repo works whenever any document is uploaded. How exactly the content is stored in file system metadata in DB and indexes in Solr respectively ?
You have to dive deep down in Alfresco documentation and code as well for getting all these clarifications.
Alfresco stores the documents in the physical directories in proper folder structures(which you can define in your code as well). CMIS services expose the functionalities for all operations which you can perform on documents. CMIS internally uses cache in CMIS session for better performance.
Documents metadata and node references all are being stored in DB(PostgreSQL) and indexing of documents are being done automatically through Solr in latest versions.
You have to specify the fields which you want in Solr document for indexing. Searching documents in Solr is faster than DB but queryConsistency is Eventual for Solr. So, as per your use case you have to decide whether query Solr or DB.
So, whenever any operation(CRUD) on any document is being done, it reflects in DB first then async indexing of that document happens in Solr. This Async indexing leads to Eventual consistency.

Resources