Re: backup option

2010-08-12 Thread Bob Proulx
hce wrote:
 I am using rsync to backup files. Is it possible to specify an option
 not to delete files from backup directory if the files are deleted
 from source? In that way, I can always keep something I may or may not
 need in the backup disk, but remove it from a work computer.

Perhaps you want the --backup --backup-dir=DIR options?

-b, --backupmake backups (see --suffix  --backup-dir)
--backup-dir=DIRmake backups into hierarchy based in DIR

Bob
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: filename paths different in server mode

2005-05-04 Thread Bob Proulx
Wayne Davison wrote:
 On Tue, May 03, 2005 at 05:26:10PM -0600, Bob Proulx wrote:
$ rsync -a ewok::cadroot/release/bin/ .
$ ls
bin
 
 Is your shell stripping off trailing slashes? 

Good thought.  But no.  Running bash.  But here is a test for that.
What you see is what you get.

  echo rsync -a ewok::cadroot/release/bin/ .
  rsync -a ewok::cadroot/release/bin/ .

 Try running a basic shell, such as /bin/sh and see if that makes a
 difference.

Nope.

 You can also use the -vv option to display the command that rsync is
 sending to the remote daemon to see if the trailing slash is still
 there or not (2.6.4 mentions the command where earlier rsync
 versions did not).  I'm doubtful that this is caused by rsync.

Is two v's different than four v's?  I gave it four v's to see the
protocol that was negotiated.

  Command to access the server:
 
rsync -a ewok::cadroot/release/bin/ .
 
opening connection using --server --sender -logDtpr

I thought that was that information.  Isn't it?

 One potential work-around:  try adding a trailing dot after the slash:
 
   $ rsync -a ewok::cadroot/release/bin/. .

Good thought.  I already tried that.  No difference.  I also tried all
of the combinations of . ./ ./. in both source and destination.  I am
sure the problem is on the server side of the process.

Its's a strange problem...

Bob
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


filename paths different in server mode

2005-05-03 Thread Bob Proulx
For some reason rsync-2.6.4 compiled by me on HP-UX 11.23 in 64-bit
mode is adding extra path elements when running in server mode.  This
is a new problem.  It did not used to do that with older versions and
it does not do that with compilations on other systems.

  $ rsync -a ewok::cadroot/release/bin/ .
  $ ls
  bin

Where did that extra directory come from?  Testing with a different
machine works as expected.

  $ rsync -a wookie::cadroot/release/bin/ .
  $ ls
  set_env
  ...more contents of bin not shown...

In the bad case I am getting an extra directory in the path.  I don't
get this in other configurations.  How can I debug this?  I am only
seeing this problem on HP-UX.  And of course that is the platform I am
trying to use.

Any hints on how to debug why this server mode is adding an extra
directory in the path?

Here is my configuration.

The machine ewok is an HP-UX machine.  I set up an rsync server
running there using this configuration:

  uid = nobody
  gid = nogroup
  [cadroot]
  path = /mnt/tools
  comment = CADROOT

Command to access the server:

  rsync -a ewok::cadroot/release/bin/ .

  opening tcp connection to ewok port 873
  opening connection using --server --sender -logDtpr
  . cadroot/release/bin/ 
  (Client) Protocol versions: remote=29, negotiated=29
  receiving file list ... 
  recv_file_name(bin)
  recv_file_name(bin/set_env)
  ... lots of lines of files ...

The path that gets created is then ./bin/* and not ./*.  There is an
extra ./bin/ in the path.  That's not good.

But if I set up a different machine, in this case a Debian Gnu/Linux
amd64 running the Debian sid 64-bit 2.6.4 I get this result.

  rsync -a wookie::cadroot/release/bin/ .

  opening tcp connection to wookie port 873
  opening connection using --server --sender -logDtpr
  . cadroot/release/bin/ 
  (Client) Protocol versions: remote=29, negotiated=29
  receiving file list ... 
  recv_file_name(.)
  recv_file_name(set_env)
  ... lots of lines of files ...

That is fine.  The files are mapped to the right location and
everything works as I expect.  As can be seen in the debug output
there is no extra 'bin' directory element.  If I use 'ssh' and remote
shell over to the broken machine then things work as expected.

  $ rsync -a -e ssh ewok:/mnt/tools/cadroot/release/bin/ .
  $ ls
  set_env
  ...more contents of bin not shown...

I configured using the native HP ANSI C compiler like this:

  ./configure CC=cc CFLAGS='-Ae +DD64'
  make

If I take that same code base and compile it on my Debian GNU/Linux
system I get a working result without the extra 'bin' directory.  So
this must have some factor of outside influence that is causing this
difference in server side behavior.

Thanks
Bob
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: include/exclude patterns to copy just certain files?

2004-07-07 Thread Bob Proulx
Wayne Davison wrote:
 Bob Proulx wrote:
rsync -a --include '*/' --include '**/a1/foo' --exclude * . example.com:/tmp/
 
 Yes, that is the way to use include/exclude without first figuring
 out where all the foo files are.  As you noted that results in all
 directories in the tree being created.

Darn.

 The easiest way around this is to switch from include/exclude to using
 the --files-from option, like this:
 
 find . -name foo | rsync -a --files-from=- . example.com:/tmp/

Yes!  That is exactly what I want.  I see that it is a new option.  I
had not noticed its arrival.  In fact I needed to upgrade to get it.

I really think that is a good design direction.  Keep all of the file
finding tasks in 'find' and use it to drive rsync.  A nice modular
approach that follows the traditional UNIX philosophy.  I like it!

As an enhancement I would really like it even more if the --from0
option could be combined with --files-from to be --files-from0.  It is
more compact and has a similar style to find's --print0 option.
Although I will probably use -av0 with this more often than anything
else so this is not a big deal.

Thank you for pointing me to that option.  It works great.

Bob
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


include/exclude patterns to copy just certain files?

2004-07-03 Thread Bob Proulx
I am attempting to copy only certain files down a directory tree.  I
know which files I want.  I could generate a file of just those with
'find'.  But having read the docs I have been trying to use the
--include and --exclude patterns to have rsync pick the right files
itself.  But I can't figure it out.  I am suspecting that I can't do
what I want to do.

Source example, this is what I have, foos and bars are files:

  dir1/a1/foo
  dir1/a2/foo
  dir1/a3/bar
  dir1/bar
  dir2/a1/foo
  dir2/a2/foo
  dir2/a3/bar
  dir2/bar

Destination example, this is what I want, just the foos:

  dir1/a1/foo
  dir2/a1/foo

Here is how I am trying to do it.

  rsync -a --include '**/a1/foo' --exclude * . example.com:/tmp/

But that does not match any files.  0 files to consider is the
result.  The man page has an example with --include */.

  rsync -a --include '*/' --include '**/a1/foo' --exclude * . example.com:/tmp/

That does too much and creates all of the directories even if there is
no file foo in the directory.  That is, in my example above all of
the */a2 directories are also copied.

Can anyone think of a way to do this?

The actual source directories are relatively large with 20k total
files or so in a deep hiearchy tree.  So expanding them on the command
line is not good since it will frequently exceed ARG_MAX.
Conceptually something like the following would work if the directory
was not too big and I could also line up the destination to match the
source.

  rsync -a $(find . -name foo -print) example.com:/tmp/  # bad example

  for file in $(find . -name foo -print); do  # another bad example
dirname=$(dirname $file)
rsync -a $file example.com:$dirname/  # 20k times seconds per ssh...
  done

That is just very, very slow.  I can almost use fsh but just the same
it would be much cleaner to do this entirely within rsync.

Thanks
Bob
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


include/exclude patterns to copy just certain files?

-- Thread Bob Proulx
->













  
  Re: include/exclude patterns to copy just certain files?
  
  
  
  
  
  








	

	rsync 

	
		
			-- Thread --
			-- Date --
			




Find 
			
		
	



	
	
	




 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx



Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw
 


Re: include/exclude patterns to copy just certain files?
Wayne Davison









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx



Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw
 


Re: include/exclude patterns to copy just certain files?
Wayne Davison









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx



Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw
 


Re: include/exclude patterns to copy just certain files?
Wayne Davison









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx



Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw
 


Re: include/exclude patterns to copy just certain files?
Wayne Davison









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx



Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw
 


Re: include/exclude patterns to copy just certain files?
Wayne Davison









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google

include/exclude patterns to copy just certain files?

-- Thread Bob Proulx
->












  
  Re: include/exclude patterns to copy just certain files?
  
  
  
  
  
  








	

	rsync 

	
		
			-- Thread --
			-- Date --
			




Find 
			
		
	



	
	
	




 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw



Re: include/exclude patterns to copy just certain files?
Wayne Davison
 









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw



Re: include/exclude patterns to copy just certain files?
Wayne Davison
 









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw



Re: include/exclude patterns to copy just certain files?
Wayne Davison
 









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw



Re: include/exclude patterns to copy just certain files?
Wayne Davison
 









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw



Re: include/exclude patterns to copy just certain files?
Wayne Davison
 









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
googl