<?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>Personal website of Dave Hope &#187; Backup</title>
	<atom:link href="http://davehope.co.uk/Blog/tag/backup/feed/" rel="self" type="application/rss+xml" />
	<link>http://davehope.co.uk</link>
	<description>Open source projects, sysadmin stuff and the home of Product Key Finder</description>
	<lastBuildDate>Fri, 27 Jan 2012 13:47:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Automatic backup of IP Office configuation</title>
		<link>http://davehope.co.uk/Blog/automatic-backup-of-ip-office-configuation/</link>
		<comments>http://davehope.co.uk/Blog/automatic-backup-of-ip-office-configuation/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 15:45:21 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ArgentOffice]]></category>
		<category><![CDATA[Avaya]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[IPOffice]]></category>
		<category><![CDATA[Lucent]]></category>

		<guid isPermaLink="false">http://davehope.co.uk/?p=903</guid>
		<description><![CDATA[I&#8217;ve recently been looking at automating backups of network devices such as switches, access points and other devices. I recently knocked up a quick batch script to backup Avaya IPOffice phone systems (It&#8217;d probably work on the older Lucent ArgentOffice too). Save the following as Backup.bat: @echo off REM ================================================================ REM CONFIGURATION INFO REM ================================================================ [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently been looking at automating backups of network devices such as switches, access points and other devices. I recently knocked up a quick batch script to backup Avaya IPOffice phone systems (It&#8217;d probably work on the older Lucent ArgentOffice too). Save the following as <em>Backup.bat</em>:</p>
<pre>@echo off

REM ================================================================
REM CONFIGURATION INFO
REM ================================================================
set CFGFILE=BackupList.txt
set DESTDIR=C:\Backups\

REM ================================================================
REM STOP CHANGING HERE OR YOU'LL BREAK SOMETHING
REM ================================================================
SET TIMESTAMP=%date:~-4,4%.%date:~-7,2%.%date:~-10,2%
for /F "tokens=1,2 delims=," %%A in (%CFGFILE%) do (
	IF NOT EXIST "%DESTDIR%%TIMESTAMP%" mkdir "%DESTDIR%%TIMESTAMP%" > NUL
	echo %%B
	tftp -i %%B GET config "%DESTDIR%%TIMESTAMP%\%%A.cfg" > NUL
)</pre>
<p> In the same directory create a TXT file named <em>BackupList.txt</em>. Add phone systems to the file that should be backed up in <em>Name,ip address</em> format. A sample BackupList.txt file might look like:</p>
<pre>London Phone System,192.168.1.1
New York phone System, 192.168.2.1</pre>
<p>You&#8217;ll also need to download the following <a href="http://www.tftp-server.com/tftp-client.html">free TFTP client from Tandom Systems Ltd</a>. Place it in the same directory as the other two files.</p>
<p>Then run <em>Backup.bat</em> to backup all your phone systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://davehope.co.uk/Blog/automatic-backup-of-ip-office-configuation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Backup your Linux system to Dropbox</title>
		<link>http://davehope.co.uk/Blog/backup-your-linux-vps-to-dropbox/</link>
		<comments>http://davehope.co.uk/Blog/backup-your-linux-vps-to-dropbox/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 14:45:00 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Dropbox]]></category>

		<guid isPermaLink="false">http://davehope.co.uk/?p=827</guid>
		<description><![CDATA[As an adovate of Dropbox I&#8217;ve been keen to find a simple way to backup by webserver/VPS to Dropbox. With up to 10gB of storage space for free there&#8217;s plenty of capacity for me to backup some MySQL databases and webroot. Unfortunately the Linux command line dropbox client doesn&#8217;t provide any way to synchronise a [...]]]></description>
			<content:encoded><![CDATA[<p><!--OffDef--><br />
As an adovate of <a href="http://db.tt/cqQwiFi">Dropbox</a> I&#8217;ve been keen to find a simple way to backup by webserver/VPS to <a href="http://db.tt/cqQwiFi">Dropbox</a>. With up to 10gB of storage space for free there&#8217;s plenty of capacity for me to backup some MySQL databases and webroot. Unfortunately the Linux command line dropbox client doesn&#8217;t provide any way to synchronise a specific directory.</p>
<p>Using <a href="http://www.andreafabrizi.it/?dropbox_uploader">Andrew Fabrizi&#8217;s Dropbox Uploader script</a> I cobbled together a quick BASH script to backup key directories to my Dropbox account.</p>
<pre>#!/bin/bash
DROPBOX_USER=&quot;Your Dropbox username&quot;
DROPBOX_PASS=&quot;Your Dropbox password&quot;
DROPBOX_DIR=&quot;Directory in your dropbox account to store the backups, e.g. /backups&quot;
BACKUP_SRC=&quot;/home /var/www /var/git /etc /root&quot;
BACKUP_DST=&quot;/tmp&quot;
MYSQL_SERVER=&quot;127.0.0.1&quot;
MYSQL_USER=&quot;root&quot;
MYSQL_PASS=&quot;Your MySQL password&quot;

#
# Stop editing here.
NOW=$(date +&quot;%Y.%m.%d&quot;)
DESTFILE=&quot;$BACKUP_DST/$NOW.tgz&quot;

#
# Upload a file to Dropbox.
# $1 = Source file
# $2 = Destination file.
function dropboxUpload
{
	#
	# Code based on DropBox Uploader 0.6 from http://www.andreafabrizi.it/?dropbox_uploader
	LOGIN_URL=&quot;https://www.dropbox.com/login&quot;
	HOME_URL=&quot;https://www.dropbox.com/home&quot;
	UPLOAD_URL=&quot;https://dl-web.dropbox.com/upload&quot;
	COOKIE_FILE=&quot;/tmp/du_cookie_$RANDOM&quot;
	RESPONSE_FILE=&quot;/tmp/du_resp_$RANDOM&quot;

    UPLOAD_FILE=$1
    DEST_FOLDER=$2

	# Login
	echo -ne &quot; &gt; Logging in...&quot;
	curl -s -i -c $COOKIE_FILE -o $RESPONSE_FILE --data &quot;login_email=$DROPBOX_USER&amp;login_password=$DROPBOX_PASS&amp;t=$TOKEN&quot; &quot;$LOGIN_URL&quot;
	grep &quot;location: /home&quot; $RESPONSE_FILE &gt; /dev/null

	if [ $? -ne 0 ]; then
		echo -e &quot; Failed!&quot;
		rm -f &quot;$COOKIE_FILE&quot; &quot;$RESPONSE_FILE&quot;
		exit 1
	else
		echo -e &quot; OK&quot;
	fi

	# Load home page
	echo -ne &quot; &gt; Loading Home...&quot;
	curl -s -i -b &quot;$COOKIE_FILE&quot; -o &quot;$RESPONSE_FILE&quot; &quot;$HOME_URL&quot;

	if [ $? -ne 0 ]; then
		echo -e &quot; Failed!&quot;
		rm -f &quot;$COOKIE_FILE&quot; &quot;$RESPONSE_FILE&quot;
		exit 1
	else
		echo -e &quot; OK&quot;
	fi

	# Get token
	TOKEN=$(cat &quot;$RESPONSE_FILE&quot; | tr -d '\n' | sed 's/.*&lt;form action=&quot;https:\/\/dl-web.dropbox.com\/upload&quot;[^&gt;]*&gt;\s*&lt;input type=&quot;hidden&quot; name=&quot;t&quot; value=&quot;\([a-z 0-9]*\)&quot;.*/\1/')

	# Upload file
	echo -ne &quot; &gt; Uploading '$UPLOAD_FILE' to 'DROPBOX$DEST_FOLDER/'...&quot;
    curl -s -i -b $COOKIE_FILE -o $RESPONSE_FILE -F &quot;plain=yes&quot; -F &quot;dest=$DEST_FOLDER&quot; -F &quot;t=$TOKEN&quot; -F &quot;file=@$UPLOAD_FILE&quot;  &quot;$UPLOAD_URL&quot;
    grep &quot;HTTP/1.1 302 FOUND&quot; &quot;$RESPONSE_FILE&quot; &gt; /dev/null

    if [ $? -ne 0 ]; then
        echo -e &quot; Failed!&quot;
		rm -f &quot;$COOKIE_FILE&quot; &quot;$RESPONSE_FILE&quot;
        exit 1
    else
        echo -e &quot; OK&quot;
		rm -f &quot;$COOKIE_FILE&quot; &quot;$RESPONSE_FILE&quot;
    fi
}

# Backup files.
mysqldump -u $MYSQL_USER -h $MYSQL_SERVER -p$MYSQL_PASS --all-databases &gt; &quot;$NOW-Databases.sql&quot;
tar cfz &quot;$DESTFILE&quot; $BACKUP_SRC &quot;$NOW-Databases.sql&quot;

dropboxUpload &quot;$DESTFILE&quot; &quot;$DROPBOX_DIR&quot;

rm -f &quot;$NOW-Databases.sql&quot; &quot;$DESTFILE&quot;</pre>
<p><span id="more-827"></span></p>

<p>Save the script as &#8220;DropboxBackup.sh&#8221;, chmod +x it and run. Maybe now&#8217;s a good time to update your crontab so that the backup runs once a month without intervention:</p>
<pre>$ crontab -e
# m h  dom mon dow   command
0 0 1 * *       /bin/bash /root/DropboxBackup.sh</pre>
<p>If you don&#8217;t have SSH access to your system, you can probably use your web control panel to execute a shell script. Sit back and smile whenever you get a notification of the backup.</p>
<p><img src="http://davehope.co.uk/wp-content/uploads/2011/01/DropboxBackup1.png" alt="BASH Dropbox Backup" title="Dropbox Backup BASH" width="352" height="113" class="size-full wp-image-849" /></p>
]]></content:encoded>
			<wfw:commentRss>http://davehope.co.uk/Blog/backup-your-linux-vps-to-dropbox/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Automatic backup of Netscreen configuration</title>
		<link>http://davehope.co.uk/Blog/automate-backups-of-netscreen-configuration/</link>
		<comments>http://davehope.co.uk/Blog/automate-backups-of-netscreen-configuration/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 13:39:07 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Disaster Recovery]]></category>
		<category><![CDATA[Netscreen]]></category>

		<guid isPermaLink="false">http://davehope.co.uk/?p=500</guid>
		<description><![CDATA[I spent some time earlier automating the backups of our appliance configuration to a restricted network share and thought I&#8217;d share a simple batch script to backup the configuration from multiple Juniper Netscreen (ScreenOS) firewalls. @echo off REM ================================================================ REM CONFIGURATION INFO REM ================================================================ set USERNAME=backupAccount set PASSWORD=superSecretPassword set CFGFILE=BackupList.txt set DESTDIR=C:\Backups\ REM ================================================================ REM [...]]]></description>
			<content:encoded><![CDATA[<p>I spent some time earlier automating the backups of our appliance configuration to a restricted network share and thought I&#8217;d share a simple batch script to backup the configuration from multiple Juniper Netscreen (ScreenOS) firewalls.</p>
<pre>@echo off
REM ================================================================
REM CONFIGURATION INFO
REM ================================================================
set USERNAME=backupAccount
set PASSWORD=superSecretPassword
set CFGFILE=BackupList.txt
set DESTDIR=C:\Backups\

REM ================================================================
REM STOP CHANGING HERE OR YOU'LL BREAK SOMETHING
REM ================================================================
SET TIMESTAMP=%date:~-4,4%.%date:~-7,2%.%date:~-10,2%
for /F "tokens=1,2 delims=," %%A in (%CFGFILE%) do (
	IF NOT EXIST "%DESTDIR%%TIMESTAMP%" mkdir "%DESTDIR%%TIMESTAMP%"
	pscp -q -scp -pw %PASSWORD% %USERNAME%@%%B:ns_sys_config "%DESTDIR%%TIMESTAMP%\%%A.cfg"
)</pre>
<p>The above will read the details of the firewalls from a CSV file (BackupList.txt) in <em>hostname,ip address</em> format. PSCP is then used to SCP the configuration from the firewall to the location specified in <em>DESTDIR</em>.</p>
<p>You&#8217;ll need to make sure SSH + SCP is enabled on your firewalls and that pscp is in the same directory as the script. You can find <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">the latest version of Putty and PSCP here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://davehope.co.uk/Blog/automate-backups-of-netscreen-configuration/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Backup your NAS</title>
		<link>http://davehope.co.uk/Blog/backup-your-nas/</link>
		<comments>http://davehope.co.uk/Blog/backup-your-nas/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 13:33:20 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[NAS]]></category>

		<guid isPermaLink="false">http://davehope.co.uk/?p=216</guid>
		<description><![CDATA[For the last 3 years I&#8217;ve had a Buffalo Terastation (HD-HTGL) at home storing photos from my Nikon D200 SLR, my music collection, films, documents and so on. I&#8217;d configured it with RAID5 which left me with just under 750Gb storage capacity. This meant that if one drive failed it&#8217;d continue on with degraded functionality. [...]]]></description>
			<content:encoded><![CDATA[<p>For the last 3 years I&#8217;ve had a Buffalo Terastation (HD-HTGL) at home storing photos from my Nikon D200 SLR, my music collection, films, documents and so on. I&#8217;d configured it with RAID5 which left me with just under 750Gb storage capacity. This meant that if one drive failed it&#8217;d continue on with degraded functionality.</p>
<p>I&#8217;d left it unplugged for a few weeks as I&#8217;d rewired some of the house and not had chance to sort out the connectivity to it. When I got around to turning it on the drive failure light started flashing and the device wasn&#8217;t exporting any of the smb shares or allowing access via http / telnet. &#8220;No problem&#8221; I thought and a few days later the replacement drive I ordered arrived. </p>
<p>With the drive replaced and the device booted up, the shares were still not visible. Thankfully I could get at the web interface so went ahead and restructured the array as instructed by the now working web interface.</p>
<p>12 hours later the device wasn&#8217;t even accessible from the network (other than intermittent ping responses). Ohh dear.</p>
<p>After a day or so of trying everything under the sun to get it working I&#8217;ve now got the drives hooked up to an old desktop and am trying to recover the data with <a href="http://www.ufsexplorer.com/">UFS Explorer</a>. Thankfully, I&#8217;ve managed to get back the majority of my financial documents. I had a copy of my music collection on my laptop (which I&#8217;d copied over a week earlier). However, all the photos I&#8217;ve taken with my Nikon D200 over the last 4 years are gone.</p>
<p>In a business environment we can back up all our data onto LTO4 media and be fairly confident we&#8217;re covered. What are we supposed to do at home though? &#8211; How is the consumer supposed to backup 1Tb of data?</p>
<p>Needless to say, I wont be buying a consumer NAS again. I&#8217;ll probably build my own Micro-ITX box and RAID1 two 1Tb drives. At least then I&#8217;ll be able to get access to the data on the device if one of the drives dies!</p>
<p>If anyone has any suggestions as to how to backup 1Tb of data, let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://davehope.co.uk/Blog/backup-your-nas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

