The details of what you need would depend on the details of what you're trying to migrate. Wordpress has different requirements than DokuWiki, Moodle, or Drupal, for example.
Generally speaking:
- try to have the same "root" path on both systems (
http://mainserver/ibay? -->
http://testserver/ibay; http://mainibay.abc? ->
http://testibay.abc)
- you will need to create an ibay account (and possibly a domain, if you're main ibay is serving content to a domain) on the test/backup server in order to get httpd setup correctly
- if your ibay uses a database, you'll have to backup the db on the old system and restore it on the test system
- if your old system has any peculiarities you may need to duplicate them on your test system (non-standard PHP, python, perl, mysql, or Apache)
- you'll have to correct file and folder ownership on the new system after transferring the contents
Having said that, here's how I go about what it sounds like you're trying to do. With a little note-taking, this process can leave you with almost everything you need to write a script to move the same ibay again, or to move from the 'test' server back to the production server.
Assumptions:
Current ibay:
myibayCurrent mysql database:
mydb (user=
mydbuser;
mydbpass)
Customizations to SME server:
none; system fully up-to-date
Current sme server:
myserver.smeTest sme server:
testserver.smeOn mysmeserver.sme:
1) Backup the mysql db into the ibay "/files" folder:
mysqldump --add-drop-table --user=mydbuser --password=mydbpass mydb | bzip2 -c > /home/e-smith/files/ibays/myibay/files/mydb.sql.bz2"
2) Enable ssh connection from the test server
3) Determine the values currently in use for
mydb,
mydbuser, and
mydbpass. Usually you can look these up in the configuration files for your web app if you don't have them recorded anywhere.
4) Lookup the specific settings for 'myibay' in server-manager for Group, User access..., Public access..., and Execution of ...
On testserver.sme:
1) Create
myibay in server-manager using the same settings as on mysmeserver.sme
2) Create the database on the new computer using:
mysql
create database mydb;
grant all privileges on mydb.* to mydbuser@localhost identified by 'mydbpass' with grant option;
quit
3) Delete the default 'index.html' file:
rm /home/e-smith/files/ibays/myibay/html/index.html
4) Get your ibay data from mysmeserver.sme:
rsync -rlptDzq -e "ssh" "root@mysmeserver.sme:/home/e-smith/files/ibays/myibay/" "/home/e-smith/files/ibays/myibay/"
5) Restore your database:
cd /home/e-smith/files/ibays/myibay/files
bunzip2 -c mydb.sql.bz2 | mysql mydb
6) Set permissions on the ibay to something that will probably work:
cd /home/e-smith/files/ibays/myibay
chown -R www:www *
7) Try it out...