Backup

With the backup feature (which is available only with a valid license) you can download the package
  • for deployment
  • for sending to somebody
  • for backup (of course)
Right-click on the package in AdminCentral and select "Backup". You will be asked to confirm this action and the download dialog will appear (the time may depend on the packages's size, because the package will be bundled first).


The name of the downloaded package consists of the packages name (as in the packages repository) and the current date. The postfix is "mgnl".

If you want to use the backup feature to make backups of your Magnolia installation you must know the respective URL.

http://[server]/[rootContext]/pack/.pack/backupPackage/[name]?mgnlPath=[packagePath]
As reference you can look at my  backup script which will download the packages you see on the left and send them to a backup server.

From Magnolia 3.1 on the URL looks like this:

http://[server]/[rootContext]/.packager/backupPackage/[name]?mgnlPath=[packagePath]

#! /bin/sh

BACKUPSERVER=backup.myserver.com
BACKUPUSER=myBackupUser
BACKUPPASSWORD=myBackupPassword

CMSUSER=myMagnoliaUser
CMSPASSWORD=myMagnoliaPassword

DATE=$(date +%Y%m%d%H%M%S)
BACKUPDIR=/var/backup
DATADIR=$BACKUPDIR/data
BASE=$DATADIR/$DATE
LOGDIR=$BACKUPDIR/log
ZIP="tar cf"
ZIP_SUFFIX=tar

PACKAGES_BASE_M_3.0="https://author.myserver.com/author/pack/.pack/backupPackage
PACKAGES_BASE="https://author.myserver.com/author/packager/.packager/backupPackage
PACKAGES="templating users config"
CONTENT_PACKAGES="site1 site2 site 3 site4"
CONTENT_PATH=/content

mkdir $BASE
cd $BASE

for package in ${PACKAGES}
do
  P=${PACKAGES_BASE}/Backup_${package}_${DATE}.mgnl?mgnlPath=/
${package}
  wget --no-check-certificate --user ${CMSUSER} --password ${CMSPASSWORD} ${P}
done

for package in ${CONTENT_PACKAGES}
do
  P=${PACKAGES_BASE}/Backup_content_${package}_${DATE}.mgnl?mgnlPath=${CONTENT_PATH}/${package}
  wget --no-check-certificate --user ${CMSUSER} --password ${CMSPASSWORD} ${P}
done

tar cf packages_${DATE}.tar *.mgnl

ftp -i ftp://$BACKUPUSER:$BACKUPPASSWORD@$BACKUPSERVER << END
cd /backup/packages
binary
put packages_${DATE}.tar
quit
END


Upload
See how you can upload a package
next