<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pario TechnoBlob &#187; backup</title>
	<atom:link href="http://pario.no/tag/backup/feed/" rel="self" type="application/rss+xml" />
	<link>http://pario.no</link>
	<description>A cronological documentation test project, nothing serious, really!</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:17:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Howto backup mysql stored functions and stored procedures</title>
		<link>http://pario.no/2009/11/02/howto-backup-mysql-stored-functions-and-stored-procedures/</link>
		<comments>http://pario.no/2009/11/02/howto-backup-mysql-stored-functions-and-stored-procedures/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 21:28:10 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[stored functions]]></category>

		<guid isPermaLink="false">http://pario.no/?p=1257</guid>
		<description><![CDATA[This is how you can backup you MySQL database(s) and stored procedures # mysqldump --routines &#60;dbname&#62; Or you can backup only the stored procedures # mysqldump --no-create-db --no-create-info --no-data --routines &#60;dbname&#62;]]></description>
			<content:encoded><![CDATA[<p>This is how you can backup you MySQL database(s) and stored procedures</p>
<pre>
# mysqldump --routines &lt;dbname&gt;</pre>
<p>Or you can backup only the stored procedures</p>
<pre>
# mysqldump --no-create-db --no-create-info --no-data --routines &lt;dbname&gt;</pre>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDkvMTEvMDIvaG93dG8tYmFja3VwLW15c3FsLXN0b3JlZC1mdW5jdGlvbnMtYW5kLXN0b3JlZC1wcm9jZWR1cmVzLzx3cHRiPkhvd3RvIGJhY2t1cCBteXNxbCBzdG9yZWQgZnVuY3Rpb25zIGFuZCBzdG9yZWQgcHJvY2VkdXJlczx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2009/11/02/howto-backup-mysql-stored-functions-and-stored-procedures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup partition table</title>
		<link>http://pario.no/2009/03/19/backup-partition-table/</link>
		<comments>http://pario.no/2009/03/19/backup-partition-table/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 21:51:05 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[fdisk]]></category>
		<category><![CDATA[recovery]]></category>

		<guid isPermaLink="false">http://pario.no/?p=983</guid>
		<description><![CDATA[This post describes how you can backup your partition table for future recovery. Backup This example describes how you can backup the disk partition table on /dev/sda dd if=/dev/sda of=sda.mbr bs=512 count=1 It&#8217;s also useful to keep a human readable copy of the disk layout for future reference sudo fdisk -l > partitions.lst Restore This [...]]]></description>
			<content:encoded><![CDATA[<p>This post describes how you can backup your partition table for future recovery.</p>
<h2>Backup</h2>
<p>This example describes how you can backup the disk partition table on <strong>/dev/sda</strong></p>
<pre>
dd if=/dev/sda of=sda.mbr bs=512 count=1</pre>
<p>It&#8217;s also useful to keep a human readable copy of the disk layout for future reference</p>
<pre>
sudo fdisk -l > partitions.lst</pre>
<h2>Restore</h2>
<p>This example shows how you can recover your file system using your partition table backup.</p>
<pre>
dd if=sda.mbr of=/dev/sda bs=512 count=1</pre>
<p>This is a nice way to keep the information about your file system and will it help you in the future if you get disk corruption.<br />
This does not only apply to linux partitions but all types of partitions.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDkvMDMvMTkvYmFja3VwLXBhcnRpdGlvbi10YWJsZS88d3B0Yj5CYWNrdXAgcGFydGl0aW9uIHRhYmxlPHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2009/03/19/backup-partition-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cold backup for the Open Source Edition of Zimbra</title>
		<link>http://pario.no/2008/02/01/cold-backup-for-the-open-source-edition-of-zimbra/</link>
		<comments>http://pario.no/2008/02/01/cold-backup-for-the-open-source-edition-of-zimbra/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 22:56:31 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[tar.]]></category>
		<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://pario.no/2008/02/01/cold-backup-for-the-open-source-edition-of-zimbra/</guid>
		<description><![CDATA[Today I&#8217;ve setup a cold backup routine to backup my Zimba installation running on my Debian (Etch) 4.0 server that is in full production now for my private domains. This is a slightly modified backup script for the Open Source Edition of Zimbra from the Zimbra Wiki. Please note that the script does a full [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve setup a cold backup routine to backup my Zimba installation running on my Debian (Etch) 4.0 server that is in full production now for my private domains. This is a slightly modified backup script for the Open Source Edition of Zimbra from the <a href="http://wiki.zimbra.com/index.php?title=Open_Source_Edition_Backup_Procedure#A_Simple_Shell_Script_Method">Zimbra Wiki</a>. Please note that the script does a full backup every time it&#8217;s being run!</p>
<pre>
#!/bin/bash

# Zimbra Backup Script
# Requires sftp to run
# This script is intended to run from the crontab as root
# Free to use and free of any warranty!  Daniel W. Martin, 9 Sept 2007

# Live sync before stopping Zimbra to minimize sync time with the services down
# Comment out the following line if you want to try single cold-sync only
rsync -avHK --delete /opt/zimbra/ /backup/zimbra

# which is the same as: /opt/zimbra /backup
# Including --delete option gets rid of files in the dest folder that don't exist at the src
# this prevents logfile/extraneous bloat from building up overtime.

# Stop Zimbra Services
sudo -u zimbra /opt/zimbra/bin/zmcontrol stop
sleep 40

# Sync to backup directory
rsync -avHK --delete /opt/zimbra/ /backup/zimbra

# Restart Zimbra Services
sudo -u zimbra /opt/zimbra/bin/zmcontrol start

# Create a txt file in the backup directory that'll contain the current Zimbra
# server version. Handy for knowing what version of Zimbra a backup can be restored to.
sudo -u zimbra zmcontrol -v &gt; /backup/zimbra/conf/zimbra_version.txt
# or examine your /opt/zimbra/.install_history

# Create archive of backed-up directory for offsite transfer
# cd /backup/zimbra
ZimbraVersion=zimbraBackup-zcs-5.0.1_GA_1902.DEBIAN4.0.20080109200914

tar -zcf /backup/$ZimbraVersion-$(date +"%Y-%m-%d").tgz -C /backup/zimbra .

# Transfer file to backup server using passwordless sftp
scp zimbraBackup-zcs-5.0.1_GA_1902.DEBIAN4.0.20080109200914-$(date +"%Y-%m-%d").tgz username@example.com:/path/to/backupfolder/</pre>
<p>I&#8217;ve described <a href="http://pario.no/2008/01/09/ssh-without-a-password/">passwordless ssh/sftp session</a> in a earlier post so I won&#8217;t describe the last line of the backup script.</p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/wiki.zimbra.com\/index.php?title=Open_Source_Edition_Backup_Procedure#A_Simple_Shell_Script_Method"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDgvMDIvMDEvY29sZC1iYWNrdXAtZm9yLXRoZS1vcGVuLXNvdXJjZS1lZGl0aW9uLW9mLXppbWJyYS88d3B0Yj5Db2xkIGJhY2t1cCBmb3IgdGhlIE9wZW4gU291cmNlIEVkaXRpb24gb2YgWmltYnJhPHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2008/02/01/cold-backup-for-the-open-source-edition-of-zimbra/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Backup mysql databases into separate files</title>
		<link>http://pario.no/2007/11/18/backup-mysql-databases-into-separate-files/</link>
		<comments>http://pario.no/2007/11/18/backup-mysql-databases-into-separate-files/#comments</comments>
		<pubDate>Sun, 18 Nov 2007 21:07:39 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysqldump]]></category>

		<guid isPermaLink="false">http://pario.no/2007/11/18/backup-mysql-databases-into-separate-files/</guid>
		<description><![CDATA[This bach script makes separate backup files of all the databases in mysql and saves the result in the mysql_backup folder. #!/bin/bash -v USERNAME='yourusername' PASSWORD='yourpassword' HOSTNAME='yourhostname' BackupFolder='/backup' for i in $(echo 'SHOW DATABASES;' &#124; mysql --user $USERNAME -p$PASSWORD -h $HOSTNAME &#124; grep -v '^Database$' ); do mysqldump --user $USERNAME -p$PASSWORD -h $HOSTNAME --opt $i > [...]]]></description>
			<content:encoded><![CDATA[<p>This bach script makes separate backup files of all the databases in mysql and saves the result in the mysql_backup folder.</p>
<pre>#!/bin/bash -v

USERNAME='yourusername'
PASSWORD='yourpassword'
HOSTNAME='yourhostname'
BackupFolder='/backup'

for i in $(echo 'SHOW DATABASES;' | mysql --user $USERNAME -p$PASSWORD -h $HOSTNAME | grep -v '^Database$' ); do
        mysqldump --user $USERNAME -p$PASSWORD -h $HOSTNAME --opt $i > $BackupFolder/$i.sql;
done;</pre>
<p>Remember to change the -h, -p and -h switch according to your needs and avoid space between -p and the password variable.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTEvMTgvYmFja3VwLW15c3FsLWRhdGFiYXNlcy1pbnRvLXNlcGFyYXRlLWZpbGVzLzx3cHRiPkJhY2t1cCBteXNxbCBkYXRhYmFzZXMgaW50byBzZXBhcmF0ZSBmaWxlczx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/11/18/backup-mysql-databases-into-separate-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script to backup MySql database</title>
		<link>http://pario.no/2007/09/08/script-to-backup-mysql-database/</link>
		<comments>http://pario.no/2007/09/08/script-to-backup-mysql-database/#comments</comments>
		<pubDate>Sat, 08 Sep 2007 00:35:27 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysqldump]]></category>

		<guid isPermaLink="false">http://hhj.no/wordpress/2007/09/08/script-to-backup-mysql-database/</guid>
		<description><![CDATA[#!/bin/bash # Shell script to backup MySql database # To backup Nysql databases file to /backup dir and later pick up by your # script. You can skip few databases from backup too. MyUSER="SET-MYSQL-USER-NAME" # USERNAME MyPASS="SET-PASSWORD" # PASSWORD MyHOST="localhost" # Hostname # Linux bin paths, change this if it can't be autodetected via which [...]]]></description>
			<content:encoded><![CDATA[<pre>
#!/bin/bash
# Shell script to backup MySql database
# To backup Nysql databases file to /backup dir and later pick up by your
# script. You can skip few databases from backup too.

MyUSER="SET-MYSQL-USER-NAME"     # USERNAME
MyPASS="SET-PASSWORD"       # PASSWORD
MyHOST="localhost"          # Hostname

# Linux bin paths, change this if it can't be autodetected via which command
MYSQL="$(which mysql)"
MYSQLDUMP="$(which mysqldump)"
CHOWN="$(which chown)"
CHMOD="$(which chmod)"
GZIP="$(which gzip)"

# Backup Dest directory, change this if you have someother location
DEST="/backup"

# Main directory where backup will be stored
MBD="$DEST/mysql"

# Get hostname
HOST="$(hostname)"

# Get data in dd-mm-yyyy format
NOW="$(date +"%d-%m-%Y")"

# File to store current backup file
FILE=""
# Store list of databases
DBS=""

# DO NOT BACKUP these databases
IGGY="test"

[ ! -d $MBD ] &amp;&amp; mkdir -p $MBD || :

# Only root can access it!
$CHOWN 0.0 -R $DEST
$CHMOD 0600 $DEST

# Get all database list first
DBS="$($MYSQL -u $MyUSER -h $MyHOST -p$MyPASS -Bse 'show databases')"

for db in $DBS
do
    skipdb=-1
    if [ "$IGGY" != "" ];
    then
	for i in $IGGY
	do
	    [ "$db" == "$i" ] &amp;&amp; skipdb=1 || :
	done
    fi

    if [ "$skipdb" == "-1" ] ; then
	FILE="$MBD/$db.$HOST.$NOW.gz"
	# do all inone job in pipe,
	# connect to mysql using mysqldump for select mysql database
	# and pipe it out to gz file in backup dir :)
        $MYSQLDUMP -u $MyUSER -h $MyHOST -p$MyPASS $db | $GZIP -9 &gt; $FILE
    fi
done</pre>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMDkvMDgvc2NyaXB0LXRvLWJhY2t1cC1teXNxbC1kYXRhYmFzZS88d3B0Yj5TY3JpcHQgdG8gYmFja3VwIE15U3FsIGRhdGFiYXNlPHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/09/08/script-to-backup-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

