<?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; Backup</title>
	<atom:link href="http://www.debiantutorials.com/category/backup/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>Installing and configuring Unison File Synchronizer</title>
		<link>http://www.debiantutorials.com/installing-and-configuring-unison-file-synchronizer/</link>
		<comments>http://www.debiantutorials.com/installing-and-configuring-unison-file-synchronizer/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 00:03:33 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[sync]]></category>
		<category><![CDATA[synchronize]]></category>
		<category><![CDATA[unison]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.com/?p=358</guid>
		<description><![CDATA[Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other. 1. Install the Unison [...]]]></description>
			<content:encoded><![CDATA[<p>Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.</p>
<p>1. Install the Unison package</p>
<p><code>apt-get install unison<br />
</code><span id="more-358"></span></p>
<p>2. Configure the Unison defaults (pico /root/.unison/default.prf)</p>
<p><code># skip asking for confirmations on non-conflicting changes<br />
auto=true<br />
&nbsp;<br />
# the user interface will ask no questions at all<br />
batch=true<br />
&nbsp;<br />
# Unison will request an extra confirmation if it appears that the entire replica has been deleted<br />
confirmbigdeletes=true<br />
&nbsp;<br />
# Unison will use the modification time and length of a file as a `pseudo inode number' when scanning replicas for updates, instead of reading the full cont$<br />
fastcheck=true<br />
&nbsp;<br />
# the group attributes of the files are synchronized<br />
group=true<br />
&nbsp;<br />
# the owner attributes of the files are synchronized<br />
owner=true<br />
&nbsp;<br />
# prefer newer version of files in case of conflicts<br />
prefer=newer<br />
&nbsp;<br />
# the textual user interface will print nothing at all, except in the case of errors.<br />
silent=true<br />
&nbsp;<br />
# file modification times (but not directory modtimes) are propagated.<br />
times=true<br />
</code></p>
<p><em>A few of the configuration values will make Unsion silent so that no user action will be required to do the sync, deleted files will be moved to /var/backups/unison to avoid accidental deletion and if the same file is updated on both servers we'll keep the newer file.</em></p>
<p>3. Create a private key to avoid passphrase popup to be able to do automatic synchronization</p>
<p><code>ssh-keygen -t dsa<br />
</code></p>
<p>4. 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>5. Manually synchronize a directory</p>
<p><code>unison /var/www ssh://remote.machine.com//var/www<br />
</code></p>
<p><em>This will sync /var/www between the local machine and remote.machine.com</code></p>
<p>6. Automatically synchronize every 5 minutes using crontab (crontab -e)</p>
<p><code>*/5 * * * * unison /var/www ssh://remote.machine.com//var/www &#038;> /dev/null<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/installing-and-configuring-unison-file-synchronizer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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! -->
