<?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>Debian Tutorials &#187; rsync</title>
	<atom:link href="http://www.debiantutorials.com/tag/rsync/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.debiantutorials.com</link>
	<description>Copy/Paste tutorials for Debian based Linux distros</description>
	<lastBuildDate>Tue, 27 Dec 2011 01:15:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Automated backups to FTP server using rsync and curlftpfs</title>
		<link>http://www.debiantutorials.com/automated-backups-to-ftp-server-using-rsync-and-curlftpfs/</link>
		<comments>http://www.debiantutorials.com/automated-backups-to-ftp-server-using-rsync-and-curlftpfs/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 16:45:26 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[curlftpfs]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=135</guid>
		<description><![CDATA[Using curlftpfs and FUSE, a ftp site is mapped to the local file system and rsync will backup files to the ftp server automatically. 1. Install required packages apt-get install curlftpfs rsync 2. Create directory to mount the ftp site mkdir /mnt/ftpbackup 3. Add the curlftpfs mount into fstab to make it mount everytime the [...]]]></description>
			<content:encoded><![CDATA[<p>Using curlftpfs and FUSE, a ftp site is mapped to the local file system and rsync will backup files to the ftp server automatically.</p>
<p>1. Install required packages</p>
<p><code>apt-get install curlftpfs rsync<br />
</code><span id="more-135"></span></p>
<p>2. Create directory to mount the ftp site</p>
<p><code>mkdir /mnt/ftpbackup<br />
</code></p>
<p>3. Add the curlftpfs mount into fstab to make it mount everytime the system is started (pico /etc/fstab)</p>
<p><code>curlftpfs#{username}:{password}@{host} /mnt/ftpbackup fuse rw,allow_other,uid={userid}      0       0<br />
</code></p>
<p><em>{username} = FTP username<br />
{password} = FTP password<br />
{host} = FTP host/ip<br />
{userid} = ID of a local user (ex. 1001)<br />
</em></p>
<p>4. Mount the ftp site</p>
<p><code>mount /mnt/ftpbackup<br />
</code></p>
<p>5. Backup using rsync</p>
<p><code>rsync -avz --no-owner --no-group /var/www /mnt/ftpbackup<br />
</code></p>
<p><em>All files in the /var/www folder will be synced to the remote machine into a folder named backup</em></p>
<p>6. Automate the backup using cron (crontab -e)</p>
<p><code>0 3 * * * rsync -az --no-owner --no-group /var/www /mnt/ftpbackup >> /dev/null 2>&#038;1<br />
</code></p>
<p><em>Your /var/www will be synced to the remote machine at 3am every day</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/automated-backups-to-ftp-server-using-rsync-and-curlftpfs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Remote backups using rsync</title>
		<link>http://www.debiantutorials.com/remote-backups-using-rsync/</link>
		<comments>http://www.debiantutorials.com/remote-backups-using-rsync/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 22:27:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[etch]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://debiantutorials.net/remote-backups-using-rsync/</guid>
		<description><![CDATA[rsync is a software application for Unix systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of rsync not found in most similar programs/protocols is that the mirroring takes place with only one transmission in each direction. rsync can copy or [...]]]></description>
			<content:encoded><![CDATA[<p>rsync is a software application for Unix systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of rsync not found in most similar programs/protocols is that the mirroring takes place with only one transmission in each direction. rsync can copy or display directory contents and copy files, optionally using compression and recursion.</p>
<p>We're going to configure a machine to sync files from a specific folder to a remote machine every day using rsync in four easy steps. This is ideal solution to do automated backups for servers and workstations.<span id="more-26"></span></p>
<p><strong><br />
1. Configure remote machine (if not using service by a third party)</strong></p>
<p>Install rsync, it must be installed on both remote and local machines to be able to sync data</p>
<p><code>apt-get install rsync<br />
</code></p>
<p>Create a new user used by the local machine to connect to the remote machine</p>
<p><code>adduser user1 --home /home/user1<br />
</code></p>
<p>Replace user1 with your preferred username. You can set any password you like and make it complicated because it's only needed once.<br />
<strong>2. Configure the local machine (the one being backed up)</strong></p>
<p>Install rsync</p>
<p><code>apt-get install rsync<br />
</code></p>
<p>Create a private key to avoid passphrase popup to be able to do automatic backups</p>
<p><code>ssh-keygen -t dsa<br />
</code></p>
<p>Copy the key to the remote machine</p>
<p><code>ssh-copy-id -i .ssh/id_dsa.pub user1@remote.machine.com<br />
</code></p>
<p>Replace user1 with your username and remote.machine.com with the remote machine's hostname or ip address</p>
<p><em>The link between the two machine is set up and you no longer need password to connect to the remote machine using ssh. You can try: ssh user1@remote.machine.com</em><br />
<strong>3. The actual backup process</strong></p>
<p>Backup folders using the following command</p>
<p><code>rsync -avz --progress -e ssh /var/www user1@remote.machine.com:backup<br />
</code></p>
<p><em>Using this command, all files in the /var/www folder will be synced to the remote machine into a folder named backup</em><br />
<strong>4. Automate the backup using cron</strong></p>
<p>Open the cron config file for current user</p>
<p><code>crontab -e<br />
</code></p>
<p>Add a line similar to the following into the config file</p>
<p><code>0 3 * * * rsync -az -e ssh /var/www user1@remote.machine.com:backup &gt;&gt; /dev/null 2&gt;&amp;1<br />
</code></p>
<p><em>Your /var/www will be synced to the remote machine at 3am every day</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/remote-backups-using-rsync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
