Home arrow FAQ arrow Remository general arrow Migrating Remository
Migrating Remository
Contributed by Administrator   
Oct 23, 2008 at 06:42 PM

If you move Remository from one place to another, you will need to alter the filepaths in the database.  There are filepaths stored in the xxx_downloads_files and xxx_downloads_containers tables, as well as in the configuration.  It is easiest to modify the configuration through the usual Remository administrator function.  The database can be effectively modified using SQL.  An example of a suitable statement is:

UPDATE `xxx_downloads_files` SET filepath = CONCAT('/home/newsitename/public_html/', SUBSTRING(filepath, LENGTH('/var/www/vhosts/oldsitename.com/httpdocs/')+1)) WHERE filepath LIKE '/var/www/vhosts/oldsitename.com/httpdocs/%' 

You are strongly advised to backup your database tables before doing this. You can also check out the effect by adding to the end of the SQL statement "AND id=n" where n is theID number for an actual entry.  That way, only a single record will be updated.  If you are happy with the result, you can remove the "AND id=n" and the SQL will then alter the whole table.  Repeat the process for xxx_downloads_containers.

Note that the paths given are merely examples.  In this case, the '/var/www/vhosts/oldsitename/com' is the part of the file paths that was in use at the old site and you want to change.  The '/home/newsitename/public_html' is an example of the replacement.  Using the LENGTH() function avoids having to count the number of characters involved, but be very careful to get the strings exactly right.

<Previous   Next>

Save FM Radio

Login

Subscribe to Premium Support

Get priority support for Remository and Glossary, sign up now for a Premium Support monthly subscription:

Your Remository user name

Or purchase a year's support:

Your Remository user name

Who is Online

Remository welcomes guests and visitors