2

Need to implement archive/backup features for Liferay 6.2 Document Library with the AdvancedFileSystemStore as given below.

dl.store.impl=com.liferay.portlet.documentlibrary.store.AdvancedFileSystemStore

I have the two below scenarios. Please suggest if there are any Liferay OOB features that can be used to accomplish the below OR any pointers on how to achieve this using custom development.

Scenario 1: Have only a single Site which has different folders containing various documents in Documents and Media Section. These folders need to be backed up periodically - say once every week. The logical folder hierarchy and the documents should be preserved in the archive folder.

For Example:

Sample Site 1 > Documents and Media > RootFolder > Folder1  > File1
Sample Site 1 > Documents and Media > RootFolder > Folder1  > File2
Sample Site 1 > Documents and Media > RootFolder > Folder2  > File1
Sample Site 1 > Documents and Media > RootFolder > Folder2  > File2

After backup this structure in archive directory should be:

ArchiveFolder > RootFolder > Folder1  > File1
ArchiveFolder > RootFolder > Folder1  > File2
ArchiveFolder > RootFolder > Folder2  > File1
ArchiveFolder > RootFolder > Folder2  > File2

Scenario 2: Have multiple sites each with different folders containing various documents in their respective Documents and Media section. All these folders need to be backed up periodically - say once every week. The logical folder hierarchy and the documents should be preserved in the archive folder.

For Example:

Sample Site 1 > Documents and Media > RootFolder > Folder1  > File1
Sample Site 1 > Documents and Media > RootFolder > Folder1  > File2
Sample Site 2 > Documents and Media > RootFolder > Folder1  > File1
Sample Site 2 > Documents and Media > RootFolder > Folder1  > File2

After backup this structure in archive directory should be:

ArchiveFolder > Sample Site 1 > RootFolder > Folder1  > File1
ArchiveFolder > Sample Site 1 > RootFolder > Folder1  > File2
ArchiveFolder > Sample Site 2 > RootFolder > Folder1  > File1
ArchiveFolder > Sample Site 2 > RootFolder > Folder1  > File2
Ashok Goli
  • 5,043
  • 8
  • 38
  • 68

1 Answers1

2

In my mind a good solution can be a custom portlet.

For defining folders you can choose between: - user interface where administrator put source/destination folder id and group id - a property file in which reading ids

For scheduled operation you can choose between: - a scheduled operation (defined in liferay-portlet.xml) - a service invoked by an automatic system cronjob

Working with files is very simple in Liferay (for visiting and copying any "node" in the Document Library tree structure): don't care about specific store.impl... using Documents API (available starting from LR 6.1) you will have a very powerful (and high-level) way to work on document library.

Pierpaolo Cira
  • 1,457
  • 17
  • 23