18.8 Using Sitecopy as a WebDAV Client

Before using Sitecopy with Oracle Portal, you must create a run control file to define WebDAV access to the Portal schema in the MDS Repository and to the directory on the file system you plan to synchronize from or to.

For example, imagine that a file named .sitecopyrc is created, which contains the following:

site username
server username-pc.at.mycompany.com
port 7778
protocol webdav
username portal
password pword
local /home/path1/path2
remote /dav_portal/portal/path3

In this example:

  • Site is the unique name that distinguishes multiple Oracle Portal site entries in this file

  • Server is the mid-tier machine

  • Port is the mid-tier port

  • Protocol is the WebDAV protocol (webdav), which is used to connect to the Portal schema in the MDS Repository

  • Username is the Single Sign-On Oracle Portal user that will perform the WebDAV file upload

  • Password is the password for the Oracle Portal SSO user

  • Local is the directory on the local file system used as the root for replication

  • Remote is the path to the Oracle Portal page to which files are replicated, that is:

    /dav_portal/portal/<page group>/<page>[/<page>]

After creating the file, set the file permissions to allow other users to read it:

chmod 0600 .sitecopyrc

The first time you start Sitecopy, you will get an error message similar to this:

sitecopy: Error: Could not open storage directory: /home/oracle/.sitecopy/
sitecopy: You need to create this directory and set the permissions to 0700.

Create the specified directory, and grant privileges to it:

cd /home/oracle
mkdir .sitecopy
chmod 0700 .sitecopy

Once you have installed Sitecopy, you can display a list of all available options/commands by entering the following command:

sitecopy --help

To initialize a connection to one or all sites defined in the run control file, use the command:

sitecopy --rcfile=/home/oracle/webdav/.sitecopyrc --allsites --initialize

To list the directory (Oracle Portal page) on the remote side, execute the command:

sitecopy --rcfile=/home/oracle/webdav/.sitecopyrc --allsites --fetch

To see the differences between the target and source repositories, use the - -flatlist option. This read-only command enables you to see what would happen if you synchronized the source with the target directory, without making any actual changes. The - -flatlist option lists the files and folders that would be added to or deleted from the target repository should synchronization actually occur. For example:

sitecopy --rcfile=/home/oracle/webdav/.sitecopyrc --allsites --flatlist

To synchronize the source repository (the file system) with the target repository (the Portal schema in the MDS Repository), use the following command:

sitecopy --rcfile=/home/oracle/webdav/.sitecopyrc --allsites --update

The source repository is always the single source of truth. In other words, upon synchronization, the source repository's directory/file structure is replicated to the target repository. This means that the target repository will look exactly the same as the source repository after the synchronization. The important thing to know is that elements in the target repository are physically deleted without notification.

More on the Oracle Technology Network

You'll find additional information on WebDAV, Sitecopy, and Oracle Portal in the article "Using WebDAV Clients to Replicate External Content into Oracle Portal," available on the Oracle Technology Network.