<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — No backup script for iRedOS6 [SOLVED]]]></title>
		<link>https://forum.iredmail.org/topic992-no-backup-script-for-iredos6-solved.html</link>
		<atom:link href="https://forum.iredmail.org/feed-rss-topic992.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in No backup script for iRedOS6 [SOLVED].]]></description>
		<lastBuildDate>Thu, 08 Jul 2010 12:42:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: No backup script for iRedOS6 [SOLVED]]]></title>
			<link>https://forum.iredmail.org/post4582.html#p4582</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>/root/iRedMail/tools</p></blockquote></div><p>Are this tools available in iRedMail 6 (not iRedOS)?</p>]]></description>
			<author><![CDATA[null@example.com (billybons2006)]]></author>
			<pubDate>Thu, 08 Jul 2010 12:42:08 +0000</pubDate>
			<guid>https://forum.iredmail.org/post4582.html#p4582</guid>
		</item>
		<item>
			<title><![CDATA[Re: No backup script for iRedOS6 [SOLVED]]]></title>
			<link>https://forum.iredmail.org/post4341.html#p4341</link>
			<description><![CDATA[<p>Stupid me...it seem I have some typo error in the script...pls ignore this....</p>]]></description>
			<author><![CDATA[null@example.com (hata_ph)]]></author>
			<pubDate>Mon, 21 Jun 2010 06:03:59 +0000</pubDate>
			<guid>https://forum.iredmail.org/post4341.html#p4341</guid>
		</item>
		<item>
			<title><![CDATA[Re: No backup script for iRedOS6 [SOLVED]]]></title>
			<link>https://forum.iredmail.org/post4302.html#p4302</link>
			<description><![CDATA[<p>Do anyone have any idea on the SQL backup script cause I want to test on how to backup and restart iRedOS/iRedMail with the ldap backend...</p>]]></description>
			<author><![CDATA[null@example.com (hata_ph)]]></author>
			<pubDate>Fri, 18 Jun 2010 01:13:41 +0000</pubDate>
			<guid>https://forum.iredmail.org/post4302.html#p4302</guid>
		</item>
		<item>
			<title><![CDATA[Re: No backup script for iRedOS6 [SOLVED]]]></title>
			<link>https://forum.iredmail.org/post4284.html#p4284</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>You can use the old one :-)</p></blockquote></div><p>The backup_MySQL.sh is not working....showing this error...</p><div class="quotebox"><blockquote><p>ls: /root/db/2010.06.16/*: No such file or directory<br />du: cannot access &#039;/root/db/2010.06.16/*&#039;: No such file or directory</p></blockquote></div><p>below is my backup_MySQL.sh</p><div class="quotebox"><blockquote><p>#!/usr/bin/env bash</p><p># Filename: backup_mysql_db.sh<br /># Author:&nbsp; &nbsp;Zhang Huangbin (michaelbibby &lt;at&gt; gmail.com)<br /># Date:&nbsp; &nbsp; &nbsp;2007.09.16<br /># Purpose:&nbsp; Backup specified mysql databases.</p><p># Copyright:<br />#<br /># This shell script is shipped within iRedMail project, released under<br /># GPL v2.<br /># ----</p><p># Usage:<br />#&nbsp; &nbsp;* Add crontab job for whichever user, such as root:<br />#<br />#&nbsp; &nbsp; &nbsp; &nbsp;# crontab -e -u root<br />#&nbsp; &nbsp; &nbsp; &nbsp;1&nbsp; &nbsp;4&nbsp; &nbsp;*&nbsp; &nbsp;*&nbsp; &nbsp;*&nbsp; &nbsp;/bin/sh /path/to/backup_mysql_db.sh<br />#&nbsp; &nbsp;<br />#&nbsp; &nbsp;* Make sure &#039;crond&#039; service is running when system startup:<br />#<br />#&nbsp; &nbsp; &nbsp; &nbsp;# chkconfig --level 345 crond on<br /># ----</p><p># -----------------------------------------------------------------<br /># ---- Modify below variables to suit your need ----<br /># -----------------------------------------------------------------<br /># Where to store backup copies.<br />#BACKUP_ROOTDIR=&#039;/backup/mysql/&#039;<br />BACKUP_ROOTDIR=&#039;/root&#039;</p><p># MySQL user and password.<br />MYSQL_USER=&#039;root&#039;<br />MYSQL_PASSWD=&#039;xxxxxxx&#039;</p><p># Which database(s) we should backup.<br />DATABASES=&quot;mysql iredadmin policyd roundcubemail&quot;</p><p># Database character set.<br />DB_CHARACTER_SET=&quot;utf8&quot;</p><p># Compress: YES | NO.<br />COMPRESS=&quot;YES&quot;</p><p># Delete plain SQL file after compressed. Compressed copy will be<br /># remained.<br />DELETE_PLAIN_SQL_FILE=&quot;YES&quot;</p><p># -----------------------------------------------------------------<br /># ---- You do *NOT* need to modify below lines. ----<br /># -----------------------------------------------------------------<br />MONTH=&quot;$(/bin/date +%Y.%m)&quot;<br />DATE=&quot;$(/bin/date +%Y.%m.%d)&quot;</p><p>BACKUP_DIR=&quot;${BACKUP_ROOTDIR}/db/${DATE}&quot;</p><p># Check necessery directory.<br />[ -d ${BACKUP_DIR} ] || mkdir -p ${BACKUP_DIR}</p><p># Logfile directory.<br />LOG_DIR=&quot;${BACKUP_ROOTDIR}/logs/${MONTH}/&quot;<br />[ -d ${LOG_DIR} ] || mkdir -p ${LOG_DIR}</p><p>LOGFILE=&quot;${LOG_DIR}/backup-mysql-${DATE}.log&quot;</p><p># create and init log file.<br />echo -e &quot;\nLog init at: ${DATE}.&quot; &gt;${LOGFILE}<br />echo &quot;Operator: Michael Bibby(michaelbibby@gmail.com).&quot; &gt;&gt;${LOGFILE}<br /># ---- End log ----</p><p>backup_db()<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; # USAGE:<br />&nbsp; &nbsp; &nbsp; &nbsp; # backup dbname<br />&nbsp; &nbsp; &nbsp; &nbsp; output_sql=&quot;${BACKUP_DIR}/${1}-${DATE}.sql&quot;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; mysqldump \<br />&nbsp; &nbsp; &nbsp; &nbsp; -u${MYSQL_USER} \<br />&nbsp; &nbsp; &nbsp; &nbsp; -p${MYSQL_PASSWD} \<br />&nbsp; &nbsp; &nbsp; &nbsp; --default-character-set=${DB_CHARACTER_SET} \<br />&nbsp; &nbsp; &nbsp; &nbsp; $1 &gt; ${output_sql}<br />}</p><p># Backup.<br />for i in ${DATABASES}<br />do<br />&nbsp; &nbsp; &nbsp; &nbsp; echo -n &quot;Backup database: $i...&quot; &gt;&gt; ${LOGFILE}<br />&nbsp; &nbsp; &nbsp; &nbsp; backup_db $i<br />&nbsp; &nbsp; &nbsp; &nbsp; echo -e &quot;\tDone&quot; &gt;&gt;${LOGFILE}<br />done</p><p># Compress plain SQL file.<br />if [ X&quot;${COMPRESS}&quot; == X&quot;YES&quot; ]; then<br />&nbsp; &nbsp; for i in $(ls ${BACKUP_DIR}/*)<br />&nbsp; &nbsp; do<br />&nbsp; &nbsp; &nbsp; &nbsp; echo -n &quot;Compress: $i...&quot; &gt;&gt;${LOGFILE}<br />&nbsp; &nbsp; &nbsp; &nbsp; bzip2 $i<br />&nbsp; &nbsp; &nbsp; &nbsp; echo -e &quot;\tDone&quot; &gt;&gt;${LOGFILE}<br />&nbsp; &nbsp; done<br />else<br />&nbsp; &nbsp; :<br />fi</p><p># Size of the backup file.<br />du -sh ${BACKUP_DIR}/* &gt;&gt;${LOGFILE}</p><p># Delete plain SQL file after compressed.<br />if [ X&quot;${DELETE_PLAIN_SQL_FILE}&quot; == X&quot;YES&quot; ]; then<br />&nbsp; &nbsp; rm -f ${BACKUP_DIR}/*sql <br />else<br />&nbsp; &nbsp; :<br />fi</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (hata_ph)]]></author>
			<pubDate>Wed, 16 Jun 2010 03:30:13 +0000</pubDate>
			<guid>https://forum.iredmail.org/post4284.html#p4284</guid>
		</item>
		<item>
			<title><![CDATA[Re: No backup script for iRedOS6 [SOLVED]]]></title>
			<link>https://forum.iredmail.org/post4283.html#p4283</link>
			<description><![CDATA[<p>You can use the old one :-)</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Wed, 16 Jun 2010 03:24:01 +0000</pubDate>
			<guid>https://forum.iredmail.org/post4283.html#p4283</guid>
		</item>
		<item>
			<title><![CDATA[No backup script for iRedOS6 [SOLVED]]]></title>
			<link>https://forum.iredmail.org/post4282.html#p4282</link>
			<description><![CDATA[<p>Just tested iRedOS 6 and notice there is no backup script under /root/iRedMail/tools. There is a iRedMail_backup script when I tested on iRedOS 5.....</p>]]></description>
			<author><![CDATA[null@example.com (hata_ph)]]></author>
			<pubDate>Wed, 16 Jun 2010 03:06:19 +0000</pubDate>
			<guid>https://forum.iredmail.org/post4282.html#p4282</guid>
		</item>
	</channel>
</rss>
