<?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>TechniTip.Net &#187; backup</title>
	<atom:link href="http://technitip.net/tag/backup/feed" rel="self" type="application/rss+xml" />
	<link>http://technitip.net</link>
	<description>TechniTip.Net - Useful tips regarding technical stuff for things like Linux, MySQL, Apache, PHP, Linux Server, iPhone and more.</description>
	<lastBuildDate>Fri, 03 Feb 2012 18:31:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
<link>http://technitip.net</link>
<url>http://technitip.net/wp-content/plugins/maxblogpress-favicon/icons/favicon-66.ico</url>
<title>TechniTip.Net</title>
</image>
		<item>
		<title>Running Rsync and Sudo over SSH</title>
		<link>http://technitip.net/running-rsync-and-sudo-over-ssh</link>
		<comments>http://technitip.net/running-rsync-and-sudo-over-ssh#comments</comments>
		<pubDate>Thu, 07 Apr 2011 11:03:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sudo]]></category>

		<guid isPermaLink="false">http://technitip.net/?p=1818</guid>
		<description><![CDATA[I often use rsync for doing backups. But if you want to do a remote backup and want to backup files and directories which are owned by different users or the root user running using rsync is difficult if you have disabled root login in your sshd_config using the statement PermitRootLogin no. For sure this is [...]<div style="clear: both;">
<strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/socket-address-family-not-supported-by-protocol' rel='bookmark' title='socket: Address family not supported by protocol'>socket: Address family not supported by protocol</a></li>
<li><a href='http://technitip.net/simple-mysql-backup-script' rel='bookmark' title='Simple MySql Backup Script'>Simple MySql Backup Script</a></li>
<li><a href='http://technitip.net/putty-ssh-login-without-password-prompt' rel='bookmark' title='PuTTY SSH Login Without Password Prompt'>PuTTY SSH Login Without Password Prompt</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p>I often use rsync for doing backups. But if you want to do a remote backup and want to backup files and directories which are owned by different users or the root user running using rsync is difficult if you have disabled root login in your sshd_config using the statement <em>PermitRootLogin no. </em>For sure this is the recommended setting if your server to backup has a public IP address.</p>
<p>A nice and easy solution which works best for me is to use sudo. This will allow to run rsync via ssh and sudo. To get it running you have to add an entry into your sudoers config file:</p>
<p>/etc/sudoers</p>
<pre>backup_user ALL=(root)NOPASSWD:/usr/bin/rsync</pre>
<p>This will allow the user <em>backup_user</em> to run the command <em>rsync</em> as root.</p>
<p>Next step is to add an <em>rsync-path</em> parameter to the remote rsync call:</p>
<pre>rsync --rsync-path="sudo rsync" backup_user@myhosttobackup.net:/root /backup_directory</pre>
<p>Finally rsync will automatically do an sudo to root on the remote server and all to backup all files owned by root as well.</p>
<p><strong>Links:</strong></p>
<ul>
<li><a title="Rsync and sudo over SSH" href="http://crashingdaily.wordpress.com/2007/06/29/rsync-and-sudo-over-ssh/" target="_blank">Rsync and sudo over SSH</a></li>
</ul>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Frunning-rsync-and-sudo-over-ssh&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div style="clear: both;"><p><strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/socket-address-family-not-supported-by-protocol' rel='bookmark' title='socket: Address family not supported by protocol'>socket: Address family not supported by protocol</a></li>
<li><a href='http://technitip.net/simple-mysql-backup-script' rel='bookmark' title='Simple MySql Backup Script'>Simple MySql Backup Script</a></li>
<li><a href='http://technitip.net/putty-ssh-login-without-password-prompt' rel='bookmark' title='PuTTY SSH Login Without Password Prompt'>PuTTY SSH Login Without Password Prompt</a></li>
</ol></p></div>]]></content:encoded>
			<wfw:commentRss>http://technitip.net/running-rsync-and-sudo-over-ssh/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automated Windows Backups</title>
		<link>http://technitip.net/automated-windows-backups</link>
		<comments>http://technitip.net/automated-windows-backups#comments</comments>
		<pubDate>Sun, 01 Feb 2009 20:41:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[automated]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[NAS]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://technitip.net/?p=526</guid>
		<description><![CDATA[No Backups for Microsofties? Mac users will already know the comfort of automated backups to an external hard disc or a network attached storage (NAS) running in background without user action. It&#8217;s really useful and easy to use. Microsoft users usually need to find their own backup solution. They can buy extra tools or use [...]<div style="clear: both;">
<strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/changing-volume-with-mouse-wheel-in-windows-7' rel='bookmark' title='Changing Volume with Mouse Wheel in Windows 7'>Changing Volume with Mouse Wheel in Windows 7</a></li>
<li><a href='http://technitip.net/free-windows-command-line-sync-tool' rel='bookmark' title='Free Windows Command Line Sync Tool'>Free Windows Command Line Sync Tool</a></li>
<li><a href='http://technitip.net/video-player-for-windowslinuxmac' rel='bookmark' title='Video Player for Windows/Linux/MAC'>Video Player for Windows/Linux/MAC</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p><strong>No Backups for Microsofties?</strong></p>
<p>Mac users will already know the comfort of automated backups to an external hard disc or a network attached storage (NAS) running in background without user action. It&#8217;s really useful and easy to use. Microsoft users usually need to find their own backup solution. They can buy extra tools or use some Freeware/OpenSource tools.</p>
<p><strong>My Goals</strong></p>
<p>It&#8217;s not much I want, just a few things should be fulfilled:</p>
<ul>
<li>Sync folders from my notebook/PC to an external hard disc (NAS)</li>
<li>Sync should run without user action</li>
<li>Sync should run automated (wish: when notebook/PC is idle)</li>
</ul>
<p><strong>SyncToy V2 from Microsoft</strong></p>
<p>Looking for such a automated backup solution I came across the tool SyncToy from Microsoft. It&#8217;s currently only available in English language. SyncToy can be obtained for free from the Microsoft homepage:</p>
<ul>
<li><a title="SyncToc V2.0 download from Microsoft" href="http://www.microsoft.com/downloads/details.aspx?familyid=C26EFA36-98E0-4EE9-A7C5-98D0592D8C52&amp;displaylang=en" target="_blank">SyncToy V2.0 download from Microsoft</a></li>
</ul>
<p>It is an easy to use Windows application for copying, moving, renaming and deleting files between folder and computers. Handling is easy, the source (left) folder as well as the destination (right) folder is specified. In my case I use the &#8220;Echo&#8221; sync action, which means that files on the destination folder are also deleted in case they are deleted on my notebook/PC. A preview can be started to see what would happen and finally the synchronization can be started using the &#8220;Run&#8221; button.</p>

<a href="http://technitip.net/wp-content/gallery/test/synctoy-01022009-211328.jpg" title="" class="shutterset_singlepic21" >
	<img class="ngg-singlepic ngg-center" src="http://technitip.net/wp-content/gallery/cache/21__620x_synctoy-01022009-211328.jpg" alt="synctoy-01022009-211328.jpg" title="synctoy-01022009-211328.jpg" />
</a>

<p align="left">
<p><strong>Still Manual</strong></p>
<p>OK, now we have an easy to use synchronisation tool and it&#8217;s for free but it&#8217;s not yet running automated in background. To do this automatically the Windows Task Scheduler is used. We generate a new scheduled task through Start, Programs, Accessories, System Tools, Scheduled Tasks. The following command line should be entered for the scheduled task:<br />
<code><br />
"C:\Program Files\SyncToy 2.0\SyncToyCmd.exe" -R<br />
</code><br />
You will need to enter a user should execute the task. You can use your current account (please note: a password seems to be needed, empty passwords seems not to work). Of course you can also generate an extra user, e.g. &#8220;backup&#8221;. Take care, if the scheduled task is executed as different user which is currently logged in, it&#8217;s needed to start SyncToy with &#8220;Run As&#8230;&#8221; for configuration because the configuration is stored separated for every user.</p>
<p><strong>Backup when Idle</strong></p>
<p>When you want to have backups done always when your notebook/PC is idle, then choose the corrosponding option for the scheduled task: execute when idle. My Windows is in German language, so I don&#8217;t know the correct name. Furthermore you can define after which passed time in idle the task should be executed. I use 10 minutes here in a first try.</p>
<p>Within the scheduled task options further options can be set like &#8220;run task not when operating in battery mode&#8221;, &#8220;stop task when battery mode is entered&#8221; which might be useful for notebooks.</p>
<p>Hint: The user which will execute SyncToy must have access to the local files as well as the remote directory. For debugging try the &#8220;Preview&#8221; button and the log file (File, view log).</p>
<p><strong>Result</strong></p>
<p>Using a free tool the files of my notebook/PC are not synchronized automatically when I&#8217;ve not done any user input for 10 minutes. Great!</p>
<p>It keeps unclear why Microsoft doesn&#8217;t add such a backup tool in Windows. Also installation is not absolutely easy. It would be nice if scheduling options could directly be set in SyncToy.</p>
<p>Compared to TimeMachine for Mac really missing are incremental backups, which means you have backups also available from past in a history.</p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fautomated-windows-backups&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div style="clear: both;"><p><strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/changing-volume-with-mouse-wheel-in-windows-7' rel='bookmark' title='Changing Volume with Mouse Wheel in Windows 7'>Changing Volume with Mouse Wheel in Windows 7</a></li>
<li><a href='http://technitip.net/free-windows-command-line-sync-tool' rel='bookmark' title='Free Windows Command Line Sync Tool'>Free Windows Command Line Sync Tool</a></li>
<li><a href='http://technitip.net/video-player-for-windowslinuxmac' rel='bookmark' title='Video Player for Windows/Linux/MAC'>Video Player for Windows/Linux/MAC</a></li>
</ol></p></div>]]></content:encoded>
			<wfw:commentRss>http://technitip.net/automated-windows-backups/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMWare ESX Backup Script</title>
		<link>http://technitip.net/vmware-esx-backup-script</link>
		<comments>http://technitip.net/vmware-esx-backup-script#comments</comments>
		<pubDate>Fri, 02 Jan 2009 15:03:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VMWare]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[esx]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[vmware infrastructure]]></category>

		<guid isPermaLink="false">http://technitip.net/?p=140</guid>
		<description><![CDATA[There is a simple method doing automated backups using VMWare Infrastructure 3. For this reason a command &#8220;vcbMounter&#8221; is included. Also the name of this command is confusing it can be used for doing backups of virtual machines. Doing a backup of a virtual machine can be done using a single command line call: vcbMounter [...]<div style="clear: both;">
<strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/simple-mysql-backup-script' rel='bookmark' title='Simple MySql Backup Script'>Simple MySql Backup Script</a></li>
<li><a href='http://technitip.net/vmware-esxi-test-installation' rel='bookmark' title='VMWare ESXi Test Installation'>VMWare ESXi Test Installation</a></li>
<li><a href='http://technitip.net/wrong-keyboard-layout-with-vmware-and-vnc' rel='bookmark' title='Wrong Keyboard Layout with VMWare and VNC'>Wrong Keyboard Layout with VMWare and VNC</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p>There is a simple method doing automated backups using VMWare Infrastructure 3. For this reason a command &#8220;vcbMounter&#8221; is included. Also the name of this command is confusing it can be used for doing backups of virtual machines.</p>
<p>Doing a backup of a virtual machine can be done using a single command line call:</p>
<pre>vcbMounter -a name:"Virtual-Machine-1" -r "/path/to/backup/Virtual-Machine-1"</pre>
<p>Ok, your vm named &#8220;Virtual-Machine-1&#8243; will now be backuped to the given path. The directory is generated from vcbMounter. The next time you will run vcbMounter it will complain that the directory already exists, so you will have to delete the directory every time before you start the backup:</p>
<pre>rm -rf "/path/to/backup/Virtual-Machine-1"
vcbMounter -a name:"Virtual-Machine-1" -r "/path/to/backup/Virtual-Machine-1"</pre>
<p>But there is another problem which will cause vcbMounter to complain: For every backup vcbMounter generates a snapshot and will not remove it after backup. What we need is to delete the snapshot before we backup:</p>
<pre>vmware-cmd "/vmfs/volumes/storage1/Virtual-Machine-1.vmx" removesnapshots

rm -rf "/path/to/backup/Virtual-Machine-1"

vcbMounter -a name:"Virtual-Machine-1" -r "/path/to/backup/Virtual-Machine-1"</pre>
<p>We delete the snapshots for a given virtual machine using &#8220;vmware-cmd&#8221; and removesnapshots. vmware-cmd needs the path to your .vmx file of the virtual machine. It&#8217;s usually stored in /vmfs/volumes/&#8230;</p>
<p>vcbMounter does not expect the path to the .vmx. It only needs the name of your virtual machine.</p>
<p>Doing the backup on a NFS mount is also possible. You need to deactive the VMWare ESX firewall and can mount e.g. using &#8220;mount -t smbfs&#8221;.</p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fvmware-esx-backup-script&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div style="clear: both;"><p><strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/simple-mysql-backup-script' rel='bookmark' title='Simple MySql Backup Script'>Simple MySql Backup Script</a></li>
<li><a href='http://technitip.net/vmware-esxi-test-installation' rel='bookmark' title='VMWare ESXi Test Installation'>VMWare ESXi Test Installation</a></li>
<li><a href='http://technitip.net/wrong-keyboard-layout-with-vmware-and-vnc' rel='bookmark' title='Wrong Keyboard Layout with VMWare and VNC'>Wrong Keyboard Layout with VMWare and VNC</a></li>
</ol></p></div>]]></content:encoded>
			<wfw:commentRss>http://technitip.net/vmware-esx-backup-script/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple MySql Backup Script</title>
		<link>http://technitip.net/simple-mysql-backup-script</link>
		<comments>http://technitip.net/simple-mysql-backup-script#comments</comments>
		<pubDate>Tue, 30 Dec 2008 13:44:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://planlos.org/~harry/php/?p=92</guid>
		<description><![CDATA[The following example scripts performs a simple backup of all MySQL databases. The resulting .sql file is automatically zipped. Using &#8220;find&#8221; backups older than 3 days are deleted, so you will get complete backups of the last 3 days. This script is intended to be called periodically (e.g. every day) from cron: 2 2       * [...]<div style="clear: both;">
<strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/vmware-esx-backup-script' rel='bookmark' title='VMWare ESX Backup Script'>VMWare ESX Backup Script</a></li>
<li><a href='http://technitip.net/mysql-optimize-script' rel='bookmark' title='MySQL Optimize Script'>MySQL Optimize Script</a></li>
<li><a href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p>The following example scripts performs a simple backup of all MySQL databases. The resulting .sql file is automatically zipped. Using &#8220;find&#8221; backups older than 3 days are deleted, so you will get complete backups of the last 3 days.</p>
<p>This script is intended to be called periodically (e.g. every day) from cron:</p>
<pre>2 2       * * *   root /root/scripts/mysql_backup.sh</pre>
<pre>#/bin/sh
now=`date "+%Y-%m-%d"`
user="mysql_user"
password="mysql_password"
path="/home/backup/"

cd $path

mysqldump -u $user -p$password  --all-databases | gzip -c &gt; backup_all_$now.sql.gz

# delete files older than 3 days
find . -name "*.gz" -type f -mtime +3 -exec rm {} ";"</pre>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fsimple-mysql-backup-script&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div style="clear: both;"><p><strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/vmware-esx-backup-script' rel='bookmark' title='VMWare ESX Backup Script'>VMWare ESX Backup Script</a></li>
<li><a href='http://technitip.net/mysql-optimize-script' rel='bookmark' title='MySQL Optimize Script'>MySQL Optimize Script</a></li>
<li><a href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li>
</ol></p></div>]]></content:encoded>
			<wfw:commentRss>http://technitip.net/simple-mysql-backup-script/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

