text 创建Joomla网站的完整备份到tar gzip文件并存储在备份目录中

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 创建Joomla网站的完整备份到tar gzip文件并存储在备份目录中相关的知识,希望对你有一定的参考价值。

#!/bin/sh

# jbackupstore -- Create a full backup of a Joomla website to tar gzip file and store in backup directory
#
# Copyright 2012 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
# Warning! This script needs the file joomlafunctions. This has to be installed in the same directory as this script.
#

# Define general variables
NOW=$(date +"%Y%m%d-%H%M%S")
STOREPATH=/backups/sites
LOGFILE=/usr/local/sbin/sitesbackup.log

# Determine path of script
MYPATH=$( cd $(dirname $0) ; pwd -P )

# Include general functions
. ${MYPATH}/joomlafunctions

echo "`date` Start backup $sitename" >> ${LOGFILE}

# dump the database to a .sql file
mysqldump --skip-opt --add-drop-table --add-locks --create-options --disable-keys --lock-tables --quick --set-charset --host=$host --user=$dbuser --password=$password --socket=$MYSOCK $database > $database.sql

# backup site
tar czf ${STOREPATH}/${sitename}.${NOW}.tgz .htaccess *

# cleanup datebase dump
rm $database.sql

echo "`date` End backup $sitename" >> ${LOGFILE}

以上是关于text 创建Joomla网站的完整备份到tar gzip文件并存储在备份目录中的主要内容,如果未能解决你的问题,请参考以下文章

text 在RewriteEngine On之后,将此代码段添加到Joomla网站的.htaccess

尝试在localhost上编辑Joomla时出现HTTP错误

将 PHP 网站转换为 Joomla

sh 使用来自debian社区的tar完全备份目录。 (可用于完整系统备份)

Centos5.5系统备份

Joomla PHPmaker身份验证