Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Portal backup and restore Jaafar Altaie 14 de junio de 2012 13:18
RE: Portal backup and restore Hitoshi Ozawa 14 de junio de 2012 15:47
RE: Portal backup and restore Jaafar Altaie 18 de junio de 2012 14:39
RE: Portal backup and restore David H Nebinger 16 de junio de 2012 9:13
RE: Portal backup and restore Jaafar Altaie 18 de junio de 2012 21:22
RE: Portal backup and restore alim amr 18 de junio de 2012 21:47
RE: Portal backup and restore Sandeep Nair 18 de junio de 2012 21:54
RE: Portal backup and restore Jaafar Altaie 19 de junio de 2012 11:17
RE: Portal backup and restore David H Nebinger 19 de junio de 2012 12:21
RE: Portal backup and restore Jaafar Altaie 19 de junio de 2012 12:56
RE: Portal backup and restore David H Nebinger 19 de junio de 2012 13:52
RE: Portal backup and restore Jaafar Altaie 19 de junio de 2012 14:00
RE: Portal backup and restore David H Nebinger 19 de junio de 2012 14:10
RE: Portal backup and restore Linus Sphinx 20 de junio de 2012 9:18
RE: Portal backup and restore David H Nebinger 20 de junio de 2012 9:23
RE: Portal backup and restore Linus Sphinx 20 de junio de 2012 10:46
RE: Portal backup and restore Hitoshi Ozawa 20 de junio de 2012 15:06
RE: Portal backup and restore Jaafar Altaie 20 de junio de 2012 12:12
RE: Portal backup and restore David H Nebinger 20 de junio de 2012 12:36
RE: Portal backup and restore Jaafar Altaie 20 de junio de 2012 12:48
RE: Portal backup and restore Hitoshi Ozawa 20 de junio de 2012 15:11
RE: Portal backup and restore Jaafar Altaie 20 de junio de 2012 16:18
RE: Portal backup and restore Hitoshi Ozawa 21 de junio de 2012 14:59
RE: Portal backup and restore Jaafar Altaie 24 de junio de 2012 8:11
RE: Portal backup and restore Hitoshi Ozawa 30 de junio de 2012 8:53
RE: Portal backup and restore Linus Sphinx 28 de junio de 2012 8:10
RE: Portal backup and restore Traolly Xiong 10 de mayo de 2013 14:20
RE: Portal backup and restore Linus Sphinx 19 de junio de 2012 10:43
RE: Portal backup and restore Hitoshi Ozawa 20 de junio de 2012 14:58
RE: Portal backup and restore Mika Koivisto 24 de junio de 2012 15:57
RE: Portal backup and restore Jaafar Altaie 25 de junio de 2012 0:34
RE: Portal backup and restore Mika Koivisto 26 de junio de 2012 12:37
Jaafar Altaie
Portal backup and restore
14 de junio de 2012 13:18
Respuesta

Jaafar Altaie

Ranking: Junior Member

Mensajes: 69

Fecha de incorporación: 26 de abril de 2012

Mensajes recientes

If need to install or upgrade the existing LIferay bundle is there any way I can backup and restore the contents of the current portal instead of having to rebuold the portal from scratch?

I'm looking at sections in the community such as:

http://www.liferay.com/community/forums/-/message_boards/message/970939

So my question is if I do a dump copy of the mySQL DB would the restoration impact the new DB installation in any way or can the dump restore simply overwrite the newly created mySQL schema that gets created when I reinstall and configure LIferay? When re-installing LIferay do I need to manually configure the DB?

Is there any way I could also back up and restore the actual portal contents without restoring the corrupt elements of the current installation?


Thanks!
Hitoshi Ozawa
RE: Portal backup and restore
14 de junio de 2012 15:47
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7990

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

If you need to upgrade, doing a dump and restore of a database won't do it because the table DDL are different. You'll have to use liferay's upgrade mechanism.
David H Nebinger
RE: Portal backup and restore
16 de junio de 2012 9:13
Respuesta

David H Nebinger

Ranking: Liferay Legend

Mensajes: 6537

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

I'd grab a snapshot of mysql before the upgrade starts. If the upgrade fails, drop the database and recreate from the snapshot.

Don't forget to do the same with the data directory, as the data directory has indexes and other stuff that may get changed during the upgrade.

Be sure to do both of these things when Liferay is not running so you get clean backups of both.
Jaafar Altaie
RE: Portal backup and restore
18 de junio de 2012 14:39
Respuesta

Jaafar Altaie

Ranking: Junior Member

Mensajes: 69

Fecha de incorporación: 26 de abril de 2012

Mensajes recientes

What is the LIferay mechanism to back up and restore an entire portal including the database and web interface format?

If the current Liferay installation is simply corrupt and I want to reinstall and older or newer version, how do I do it? I haven't really seen a complete guide for backing up a portal (including mySQL Demoticon and restoring it after downloading and installing a new LIferay version. I'm looking at the following guide:

http://www.liferay.com/documentation/liferay-portal/6.0/administration/-/ai/backing-up-a-liferay-installati-4


But this doesn't really provide a comprehensive explanation. Any suggestions about a complete (end to end) back up and restore method? Thanks!
Jaafar Altaie
RE: Portal backup and restore
18 de junio de 2012 21:22
Respuesta

Jaafar Altaie

Ranking: Junior Member

Mensajes: 69

Fecha de incorporación: 26 de abril de 2012

Mensajes recientes

David,

I guess my question is more specifically, this:

Besides grabbing a snapshot of the DB, which particular files, folders, parts of the Liferay installation do I need to back up and how to do I restore these to a new Liferay installation to fix previously corrupted installations? Are there any specific steps I should take for doing a complete re-installation for a corrupt LIferay installation? Thanks, J
alim amr
RE: Portal backup and restore
18 de junio de 2012 21:47
Respuesta

alim amr

Ranking: New Member

Mensajes: 1

Fecha de incorporación: 18 de junio de 2012

Mensajes recientes

Hi,

I have the same above problem, I want to know little more details for backup like, lets say:

Besides grabbing a snapshot of the DB,

1) which particular files, folders, parts of the Liferay installation do I need to back up and

2) How to do I restore these to a new Liferay installation to fix previously corrupted installations?

3) Are there any specific steps I should take for doing a complete re-installation for a corrupt LIferay installation?"

Thanks,
Sandeep Nair
RE: Portal backup and restore
18 de junio de 2012 21:54
Respuesta

Sandeep Nair

Ranking: Liferay Legend

Mensajes: 1692

Fecha de incorporación: 5 de noviembre de 2008

Mensajes recientes

Besides Database as David said, I would backup data folder(which consists lucene indexes,uploaded documents,etc) which is in LIFERAY_HOME directory.

If you are using jackrabbit as file repository and have stored all the files in database then you have to have the snapshot of jcr db as well.

Keep a backup of portal-ext.properties too.

Regards,
Sandeep
Linus Sphinx
RE: Portal backup and restore
19 de junio de 2012 10:43
Respuesta

Linus Sphinx

Ranking: Junior Member

Mensajes: 84

Fecha de incorporación: 12 de agosto de 2010

Mensajes recientes

Users of MySql might want to check out xtrabackup too.
http://www.percona.com/doc/percona-xtrabackup/
Jaafar Altaie
RE: Portal backup and restore
19 de junio de 2012 11:17
Respuesta

Jaafar Altaie

Ranking: Junior Member

Mensajes: 69

Fecha de incorporación: 26 de abril de 2012

Mensajes recientes

So the first step of backing a mySQL db seems to be fairly straightforward with a number of methods to get the right snapshot. I am opting to use the mysqldump utility.

The next step of restoring a new LR installation could be more tricky. Which directories / files need to be copied to restore the same build whereby the original pages can be restored. For example, there's a page containing a content management plugin (Not Lucene or Jackrabbit -just plain old Liferay generic plugin). How do I copy that? Which file / folder do I need to copy? Is restoring after the new Liferay installation just a question of pasting the copied folder / files into the new installation so that the pages in the new installation can talk to the restored database? In other words, which files and folders do I need to copy to preserve the functionality of my original installation?

Either I'm missing something really obvious or there's no easy way to back up and restore the functionality of an existing installation. Maybe it's just quicker and easier to rebuild an entire portal if making a new Liferay installation? please advise! THANK YOU
David H Nebinger
RE: Portal backup and restore
19 de junio de 2012 12:21
Respuesta

David H Nebinger

Ranking: Liferay Legend

Mensajes: 6537

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

When you are ready to make a backup, run mysqldump for the database portion and an archive utility to do the data directory (i.e. zip or tar/bz2 for example). These two go together and are definitely tied to each other. Liferay should not be running when you do this.

When you are ready to restore from a backup, restore the database from the dump and replace the contents of the data directory w/ the archive (delete the contents of the directory and extract the archive contents back to the directory). Liferay should not be running when you do this.
Jaafar Altaie
RE: Portal backup and restore
19 de junio de 2012 12:56
Respuesta

Jaafar Altaie

Ranking: Junior Member

Mensajes: 69

Fecha de incorporación: 26 de abril de 2012

Mensajes recientes

David,

Exactly the kind of info i was after. Thank you! I'd just like to know a couple of things about the data directory:

1) Is there only one main data directory located (on my file system) in M:\liferay\xtract\liferay-portal-6.1.0-ce-ga1\data?


2) Does the contents of the data directory also controls the page structure of the portal? So if i restore the contents of the directory does this also restore the structure of the portal or will I need to rebuild / re-create the relevant pages that correspond to the documents and data?

Thanks again!
David H Nebinger
RE: Portal backup and restore
19 de junio de 2012 13:52
Respuesta

David H Nebinger

Ranking: Liferay Legend

Mensajes: 6537

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

1. The default is only a single data directory, but you can actually specify different locations for the various parts of data using portal-ext.properties (to move the lucene indexes, the jackrabbit repository, etc.).

2. The layout and definition stuff is in the database. Images, documents, etc. will (normally) be in the filesystem.

You really shouldn't try to do a restore of only one of the pieces (database or filesystem) as you'll end up with missing pieces. If you're going to restore one, restore them both. Trust me, you don't want to try to rebuild either of these manually...
Jaafar Altaie
RE: Portal backup and restore
19 de junio de 2012 14:00
Respuesta

Jaafar Altaie

Ranking: Junior Member

Mensajes: 69

Fecha de incorporación: 26 de abril de 2012

Mensajes recientes

Well this is what I'm confused about because the LAST thing I want to to do is build either the DB or portal manually. I want to know which sections to back up and restore to get an exact duplicate portal working on a new LIferay installation.

From what you're telling Am I right to assume that backing up and restoring the DB and the data directory will give me an identical portal on my new Liferay installation?

Thanks!
David H Nebinger
RE: Portal backup and restore
19 de junio de 2012 14:10
Respuesta

David H Nebinger

Ranking: Liferay Legend

Mensajes: 6537

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

Yes, if you grab both and restore them somewhere else, you'll have an exact copy of the current site at the time the backup was completed.

Note that this does not include any of the plugins you may have deployed (so if you deployed a theme and have all of the pages using this theme when you do the export, importing to a clean Liferay install w/o the theme will end up w/ errors in the log).

Cloning an environment should also include all deployed plugins (portlets, themes, hooks, etc.) on top of the database and filesystem components.
Linus Sphinx
RE: Portal backup and restore
20 de junio de 2012 9:18
Respuesta

Linus Sphinx

Ranking: Junior Member

Mensajes: 84

Fecha de incorporación: 12 de agosto de 2010

Mensajes recientes

If I copy all the deployed plug-ins that don't come in a bundle from the prior version will it upgrade them like the database?

------------------------
#!/bin/bash
# @author: sphinx 6.11.2011
# old/new version numbers for LIFEray and TOMcat
OLDLIFE=6.0.6
OLDTOM=6.0.29
NEWLIFE=6.1.0-ce-ga1
NEWTOM=7.0.23
# sanctioned are portlets we provide, do *not* over write but copy all other portlets users have installed
SANCTIONED="chat-portlet google-maps-portlet kaleo-web organizations-map-portlet ROOT weather-portlet wsrp-portlet docs ip-geocoder-portlet list-portlet organization-users-1.0 tunnel-web web-form-portlet"

# copy portlets not included
export SANCT="FALSE"
for i in `ls /usr/local/liferay-portal-${OLDLIFE}/tomcat-${OLDTOM}/webapps/`
do
for j in $SANCTIONED
do
if [ $j == $i ]; then
export SANCT="TRUE"
fi
if [ "$SANCT" == "FALSE" ]; then
cp -pr /usr/local/liferay-portal-${OLDLIFE}/tomcat-${OLDTOM}/webapps/$i /usr/local/liferay-portal-${NEWLIFE}/tomcat-${NEWTOM}/webapps/
fi
done
done
David H Nebinger
RE: Portal backup and restore
20 de junio de 2012 9:23
Respuesta

David H Nebinger

Ranking: Liferay Legend

Mensajes: 6537

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

Some of the plugins may be compatible between 6.0.6 and 6.1.0, but this is not guaranteed.

Personally I'd grab the 6.1.0 SDK and use it to re-build the plugins (after tweaking them in the new SDK directory, i.e. update the themes to have 6.1 compatibility, fix any compile errors encountered, etc.).

Bring the 6.1.0 environment up using the HSQL guy to make sure the instance is ready to go.

Then point the instance at the restored database and data directory, start it up and then go through the process of dealing w/ upgrade failures.
Linus Sphinx
RE: Portal backup and restore
20 de junio de 2012 10:46
Respuesta

Linus Sphinx

Ranking: Junior Member

Mensajes: 84

Fecha de incorporación: 12 de agosto de 2010

Mensajes recientes

Whoa, sounds like manual labor! Will eventually need to do an upgrade on a rather large farm of these, all have had users wildly installing different things and I'm the only guy on the server team. Thinking more something like automate locating the latest binary version of plug-in in the Marketplace and copy that into the deployment directory and let it install on start up?
Jaafar Altaie
RE: Portal backup and restore
20 de junio de 2012 12:12
Respuesta

Jaafar Altaie

Ranking: Junior Member

Mensajes: 69

Fecha de incorporación: 26 de abril de 2012

Mensajes recientes

Going back to basics and at the risk of sounding pedantic, would the following steps work for backing up and restoring a LIferay install:

DATABASE
1) Backup mydb_life
2) Delete mydb_life
3) Verify deletion
4) Restore mydb_life from backup


LIFERAY
5) Backup / Copy Liferay data folder
6) Shutdown Liferay
7) Uninstall Liferay
8) Re-extract / reinstall LIferay
9) Replace existing data folder with backed data folder
10) Configure database in new installation wizard

?
David H Nebinger
RE: Portal backup and restore
20 de junio de 2012 12:36
Respuesta

David H Nebinger

Ranking: Liferay Legend

Mensajes: 6537

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

It would be more like:

1. shut down liferay tomcat server.
2. backup database.
3. backup data directory.
4. restart liferay tomcat server.

When the restore needs to occur:

1. shut down liferay tomcat server
2. delete database.
3. restore from backup.
4. delete data directory.
5. restore from backup.
6. restart liferay tomcat server

Note that liferay is shutdown throughout the backup/restore process to ensure that there are no concurrent modifications going on.

Liferay doesn't change during this process (nor does it need to). You do not have to delete liferay bundle, do not have to reinstall it, do not have to re-run the wizard...

All you're doing is replacing the current database and data w/ previously used info.

Those are the steps only for backup/restore. You mentioned cloning one liferay instance to another location that has slightly different steps.
Jaafar Altaie
RE: Portal backup and restore
20 de junio de 2012 12:48
Respuesta

Jaafar Altaie

Ranking: Junior Member

Mensajes: 69

Fecha de incorporación: 26 de abril de 2012

Mensajes recientes

IN an earlier thread (http://www.liferay.com/community/forums/-/message_boards/message/14243215) LIferay staff told me there could be a problem with the version of my installation. So I'm assuming if I'm going ot reinstall it should be as clean as possible, while retaining the basic data and structure. So how would the steps you described apply to that situation? Obviously my aim is to backup and restore content without restoring bugs and problems of the prior install.
Hitoshi Ozawa
RE: Portal backup and restore
20 de junio de 2012 14:58
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7990

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

Users of MySql might want to check out xtrabackup too.
http://www.percona.com/doc/percona-xtrabackup/


Thanks for the information. Being able to do a online backup really looks interesting.
Our operation center was having trouble with it.
Hitoshi Ozawa
RE: Portal backup and restore
20 de junio de 2012 15:06
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7990

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

Thinking more something like automate locating the latest binary version of plug-in in the Marketplace and copy that into the deployment directory and let it install on start up?


Just downloading and installing directly a plugin from a Marketplace on to a production server is asking for touble. Even with Liferay.com, there's so many new bugs in newer versions that may cause server to error.

Most of the time, I have to download a plugin on to my test server, fix it, and make it available to my users.

Production server needs high quality "software" and not high quality "support". I need my servers from not crashing more than I need assistance after my server goes down. :-)
Hitoshi Ozawa
RE: Portal backup and restore
20 de junio de 2012 15:11
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7990

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

You can only backup and restore to the EXACT same version of liferay including plugins. If you need to use newer version, you'll need to do data migration after moving to the new environment.

If your database is corrupt, doing a backup and restore would fix the problem. Better approach is to export and import each data.
Jaafar Altaie
RE: Portal backup and restore
20 de junio de 2012 16:18
Respuesta

Jaafar Altaie

Ranking: Junior Member

Mensajes: 69

Fecha de incorporación: 26 de abril de 2012

Mensajes recientes

Hitoshi,

Lifereay suggests that I use the latest version of Liferay portal and plug ins because I can't seem to get custom plugins to work on my existing installation. SO, I want to go to a newer version in which case what is the procedure for data migration?

I'm going to try back up and restore first. If that doesn't work please let me know the process for doing data migration to a newer version and/or where to find DETAILED instructions on doing data migrations. I already have the book Liferay in Action (which contains very little on this subject), I've read some of the user documentation which seems to cover general concepts of back and restore, but I can't seem to find a detailed, definitive guide on how to back up, restore, migrate, etc.

What I'm looking for is a detailed walk through. I do understand the concept and theory of back up restore, migration, etc but actually applying seems to differ from version to version of Liferay so I need a walk through on the latest Liferay portal version (Tomcat bundle). Hope that is available somewhere.

Many thanks!
Hitoshi Ozawa
RE: Portal backup and restore
21 de junio de 2012 14:59
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7990

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

Lifereay suggests that I use the latest version of Liferay portal and plug ins because I can't seem to get custom plugins to work on my existing installation. SO, I want to go to a newer version in which case what is the procedure for data migration?


Yes, that may be Liferay's suggestion but do you really all the new functionalitieis? Do they really work as expected? For example, Liferay 6.1.0CE is very buggy and has a
performance and resource usage problem as well. In all, it's very unsuitable for production. Even Liferay.com hasn't versioned up this site to 6.1 EE yet.

IMHO, the current stable release is 6.0.6 but I have to say that there are some bug which you may have to fix to get it working for your system.

How about checking out the version if you can run it stably before spending time on migration and development. It may save you a lot of time and headche.
Jaafar Altaie
RE: Portal backup and restore
24 de junio de 2012 8:11
Respuesta

Jaafar Altaie

Ranking: Junior Member

Mensajes: 69

Fecha de incorporación: 26 de abril de 2012

Mensajes recientes

Good advice. I'll download, install and try 6.06. If this is stable I'm guessing I will have to migrate the existing data. My current version is (liferay-portal-6.1.0-ce-ga1). So will it be possible to migrate and restore to an older version? Any idea on where I can find detailed instructions? Thanks
Mika Koivisto
RE: Portal backup and restore
24 de junio de 2012 15:57
Respuesta

Mika Koivisto

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1499

Fecha de incorporación: 7 de agosto de 2006

Mensajes recientes

When you backup Liferay you should make sure that both the filesystem backup and database backup are consistent otherwise you might have some file references in database that are not in the data/document_library folder or wise versa. I blogged about how to take a consistent Liferay backup last month and even created and shared a script for it.
Jaafar Altaie
RE: Portal backup and restore
25 de junio de 2012 0:34
Respuesta

Jaafar Altaie

Ranking: Junior Member

Mensajes: 69

Fecha de incorporación: 26 de abril de 2012

Mensajes recientes

Mika,

This is really useful, but is this backward compatible? Ie: If I'm downgrading from v6.1 to 6.0 can I still point the mySQL to the 6.1 DB? I tried doing that in the 6.0 portal-ext.properties and it gave errors.

The 6.0 installation works with a DB created by a prior 6.0 installation but seems to run into problems if it points to a DB created by a higher version.
Mika Koivisto
RE: Portal backup and restore
26 de junio de 2012 12:37
Respuesta

Mika Koivisto

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1499

Fecha de incorporación: 7 de agosto de 2006

Mensajes recientes

You can't downgrade Liferay database.
Linus Sphinx
RE: Portal backup and restore
28 de junio de 2012 8:10
Respuesta

Linus Sphinx

Ranking: Junior Member

Mensajes: 84

Fecha de incorporación: 12 de agosto de 2010

Mensajes recientes

Migration is a subject unto itself and is not working all that hot for me at the moment, but backup and restore in a MySql innodb environment I might be of some help. I use http://www.percona.com/doc/percona-xtrabackup/ as it will do it hot without shutting it down. Find the one that matches your version.
Create a folder to hold your backups and an event to run your backup script every night from cron;
1# mkdir /usr/local/backups
2# echo "0 23 * * * /usr/local/backups/backup.sh >> /usr/local/backups/backup.log 2>&1" | crontab - -u mysql

In the /usr/local/backups directory create two scripts, this one to backup name it /usr/local/backups/backup.sh:
 1#!/bin/bash
 2USER=foo
 3PASS=assword
 4BACKUPDIR=/usr/local/backups
 5SOCKET=/var/lib/mysql/mysql.sock
 6RETENTION=7
 7
 8function error_exit {
 9   echo "Problem - check logs"
10   touch $BACKUPDIR/FAIL
11}
12
13echo "**********************************************"
14echo "Start of backup"
15echo "**********************************************"
16innobackupex-1.5.1 --user=$USER --password=$PASS --socket=$SOCKET --stream=tar . | gzip -c -1 > $BACKUPDIR/backup.`date +%Y-%m-%d-%H-%M-%S`.tar.gz
17if [ $? != 0 ]; then
18 error_exit
19fi
20echo "Removing old files"
21find $BACKUPDIR -mtime +$RETENTION -name "*.gz" -print -exec rm {} \;
22if [ $? != 0 ]; then
23 error_exit
24fi
25echo "**********************************************"
26echo "End of Backup"
27echo "**********************************************"

this one to restore, name it /usr/local/backups/restore.sh; NOTE: this wipes out and restores the entire database, assumes you have nothing but your portal on it.
 1#!/bin/bash
 2# restore.sh - restore an xtrabackup tar.gz file
 3USER=foo
 4PASS=assword
 5function usage
 6{
 7 cat << EOF
 8
 9Restore an xtrabackup tar.gz file and replace a mysql database.
10
11usage: $0 options
12
13OPTIONS:
14   -b      Name of the tarred and gzipped database backup to restore
15   -h      Show this message
16
17EOF
18}
19TARFILE=
20while getopts "b:h?" OPTION
21do
22 case $OPTION in
23   b)
24     TARFILE=$OPTARG
25     ;;
26   h)
27     usage
28     exit 1
29     ;;
30   ?)
31     usage
32     exit 1
33     ;;
34 esac
35done
36if [[ -z $TARFILE ]]; then
37 usage
38 exit 1
39fi
40echo Beginning restoration of $TARFILE ...
41BACKUPDIR=/usr/local/backups/${TARFILE%.tar.gz}
42if [[ -e $BACKUPDIR ]]; then
43 echo removing directory from prior run
44 rm -rf $BACKUPDIR
45fi
46mkdir -p $BACKUPDIR
47tar xifz $TARFILE -C $BACKUPDIR
48innobackupex-1.5.1 --user=$USER --password=$PASS --apply-log $BACKUPDIR
49/etc/rc.d/init.d/mysqld stop
50rm -rf /var/lib/mysql/*
51innobackupex-1.5.1 --copy-back $BACKUPDIR
52chown -R mysql:mysql /var/lib/mysql
53/etc/rc.d/init.d/mysqld start
54echo Restoration of $TARFILE complete.
55rm -rf $BACKUPDIR

Now you have scheduled backups that will keep a weeks worth of snapshots and clean out the old on your database, just add a sister event on your portal server to tar up at least the data directory of liferay or more depending on how much you change it at about the same time and you're good to go. Just check the timestamps and restore them as a pair.
Hitoshi Ozawa
RE: Portal backup and restore
30 de junio de 2012 8:53
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7990

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

So will it be possible to migrate and restore to an older version?


Sorry no. If you download liferay's source code, there is a sql directory which has update-xxx.sql script files.
You can look at the sql statements and try to write a reverse script to downgrade.
Traolly Xiong
RE: Portal backup and restore
10 de mayo de 2013 14:20
Respuesta

Traolly Xiong

Ranking: New Member

Mensajes: 19

Fecha de incorporación: 30 de diciembre de 2011

Mensajes recientes

Hello ,
Do we have to be concerned about the plugins under webapps dir when doing the restore?

Thoughts?

Regards,
TRX