<?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>Ignore Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/ignore/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/ignore/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:15:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Ignore existing files or update only newer files with rsync</title>
		<link>https://www.scmgalaxy.com/tutorials/ignore-existing-files-or-update-only-newer-files-with-rsync/</link>
					<comments>https://www.scmgalaxy.com/tutorials/ignore-existing-files-or-update-only-newer-files-with-rsync/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sat, 09 Dec 2017 10:24:59 +0000</pubDate>
				<category><![CDATA[Unix / Linux]]></category>
		<category><![CDATA[Ignore]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=2682</guid>

					<description><![CDATA[<p>rajeshkumar created the topic: Ignore existing files or update only newer files with rsync Ignore existing files or update only [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/ignore-existing-files-or-update-only-newer-files-with-rsync/">Ignore existing files or update only newer files with rsync</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>rajeshkumar created the topic: Ignore existing files or update only newer files with rsync</strong></p>
<p>Ignore existing files or update only newer files with rsynca</p>
<p>Copying from local to remote</p>
<p>Note that all the examples shown in the post are for copying files from the local computer to a remote server/computer.</p>
<p>Default behavoir</p>
<p>The following command will recursively copy all files from the local filesystem from /var/www to the remote system at 10.1.1.1. Note the following:</p>
<p>Any files that do not exist on the remote system are copied over<br />
Any that have been updated will be copied over, although note that rsync is extremely efficient in that only the changed parts of files are copied and if the file is exactly the same if it is not copied over at all<br />
Any that have been deleted on the local system are deleted on the remote<br />
1	rsync -raz &#8211;progress /var/www 10.1.1.1:/var</p>
<p>Ignore existing files</p>
<p>Use the &#8211;ignore-existing flag to prevent files from being copied over that already exist on the remote server. By adding this, we eliminate behaviors 2 and 3 in the list above and all that is done is this:</p>
<p>Any files that do not exist on the remote system are copied over<br />
1	rsync &#8211;ignore-existing -raz &#8211;progress /var/www 10.1.1.1:/var</p>
<p>Update the remote only if a newer version is on the local filesystem</p>
<p>In the case I was talking about, we didn&#8217;t want to overwrite any files at the other end. However you may want to copy files over the have been updated more recently on the local filesystem which is done with the &#8211;update flag. The behavior is now like this:</p>
<p>Any files that do not exist on the remote system are copied over<br />
Any files that exist on both local and remote that have a newer timestamp on the local server are copied over. (Conversely, any files that have an older timestamp are not copied over).<br />
1	rsync &#8211;update -raz &#8211;progress /var/www 10.1.1.1:/var</p>
<p>Use &#8211;dry-run to see what will be copied</p>
<p>It can be a good idea to test what will be transferred before actually doing it to make sure you aren&#8217;t going to copy files that you don&#8217;t want to. The &#8211;dry-run flag helps you do this:<br />
1	rsync &#8211;dry-run &#8211;update -raz &#8211;progress /var/www 10.1.1.1:/var</p>
<p>Combined with the &#8211;progress flag I have included in all the examples, &#8211;dry-run will output all the directories it looks at and then all the files that would be copied.</p>
<p>Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/ignore-existing-files-or-update-only-newer-files-with-rsync/">Ignore existing files or update only newer files with rsync</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/ignore-existing-files-or-update-only-newer-files-with-rsync/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
