<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3450196409836244286</id><updated>2012-02-16T20:22:13.661-08:00</updated><title type='text'>Smart Solutions</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://virtutech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3450196409836244286/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://virtutech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>antivirus</name><uri>http://www.blogger.com/profile/04604063775003685780</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3450196409836244286.post-5133766467519580849</id><published>2011-07-12T00:20:00.000-07:00</published><updated>2011-07-12T00:34:17.489-07:00</updated><title type='text'>Rsync</title><content type='html'>&lt;div style="margin-bottom: 0cm;"&gt;Rsync is  a fast, versatile, remote (and local) file-copying tool which synchronizes &lt;a href="http://en.wikipedia.org/wiki/Computer_file"&gt;files&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Directory_%28file_systems%29"&gt;directories&lt;/a&gt; from one location to another.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;It  is  famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination.   &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;Rsync is widely used for backups and mirroring and as an improved copy  command  for       everyday use.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;Access via remote shell:&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;Pull: rsync [OPTION...] [USER@]HOST:SRC... [DEST]&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;Push: rsync [OPTION...] SRC... [USER@]HOST:DEST&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;Push:&lt;br /&gt;&lt;br /&gt;If you want to push the data from /home of the server to another server then syntax would be&amp;nbsp; &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;rsync -vrplogDtH --exclude-from="/root/ignoredir" -e ssh /home/* &lt;a href="mailto:root@IP"&gt;root@IP&lt;/a&gt;:/home&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;rsync -vrplogDtH --exclude-from="/root/ignoredir" -e ssh /home/* root@10.10.10.101:/backup1/&lt;br /&gt;&lt;br /&gt;Pull:&lt;br /&gt;&lt;br /&gt;If you want to pull the data from /home of another server to your server then syntax would be&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;rsync -vrplogDtH --exclude-from="/root/ignoredir" -e ssh&amp;nbsp; &lt;a href="mailto:root@IP"&gt;root@IP&lt;/a&gt;:/home/* /home/&lt;br /&gt;&lt;br /&gt;Now let us summarize the regular options used in rsync for data copy.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-delete-excluded&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;In  addition  to  deleting the files on the receiving side that are not on the sending side, this tells rsync to also delete any files on the receiving side that are excluded  &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;Pull:&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;rsync -vrplogDtH --exclude-from="/root/ignoredir" -e ssh root@10.10.10.100:/home/* /home&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-v, --verbose               increase verbosity&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-r, --recursive             recurse into directories&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-p, --perms                 preserve permissions&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;This  option  causes  the receiving rsync to set the destination permissions to be the same as the source permissions.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-l, --links                 copy symlinks as symlinks&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-o, --owner                 preserve owner (super-user only)&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;This option causes rsync to set the owner of the destination file to be the same as the source file, but only if the receiving rsync is being run as  the  super-user  &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-g, --group                 preserve group&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-H, --hard-links          preserve hard links&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-e  This option allows you to choose an alternative remote shell program to use for communication between the local and remote copies of rsync. Typically,  rsync  is configured to use ssh by default&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-a, --archive               archive mode; equals -rlptgoD  &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;This  option  causes rsync to set the group of the destination file to be the same as the source file.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-D                            same as --devices –specials&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;--devices&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;This option causes rsync to transfer character and block device files to the remote system to recreate these devices.  &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;--specials&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;This option causes rsync to transfer special files such as named sockets and fifos.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;Under Linux and UNIX each and every hardware device treated as a file. a device file (also called as a special file) is an interface for a device driver  &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2&gt;Device files are of two types&lt;/h2&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0cm;"&gt;Character special files or  Character devices   &lt;/div&gt;&lt;/li&gt;&lt;li&gt;Block special files or Block devices   &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;A character device is marked with a &lt;span style="color: red;"&gt;c&lt;/span&gt; as the first letter of the permissions strings.&lt;br /&gt;&lt;code&gt;$ ls -l /dev/console&lt;/code&gt;&lt;br /&gt;A block device is marked with a &lt;span style="color: red;"&gt;b&lt;/span&gt; as the first letter of the permissions strings:&lt;br /&gt;&lt;code&gt;$ ls -l /dev/sdb1&lt;/code&gt;  &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-t, --times                 preserve modification times&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;This  tells  rsync to transfer modification times along with the files and update them on the remote system.  Note that if this option is not used, the optimization that excludes files that have not been modified cannot be effective;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-H, --hard-links            preserve hard links&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3450196409836244286-5133766467519580849?l=virtutech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://virtutech.blogspot.com/feeds/5133766467519580849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://virtutech.blogspot.com/2011/07/rsync.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3450196409836244286/posts/default/5133766467519580849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3450196409836244286/posts/default/5133766467519580849'/><link rel='alternate' type='text/html' href='http://virtutech.blogspot.com/2011/07/rsync.html' title='Rsync'/><author><name>antivirus</name><uri>http://www.blogger.com/profile/04604063775003685780</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
