Chris Green
2024-Oct-16 21:00 UTC
Is there any easy way to set some default rsync options?
I use rsync a lot, it's a wonderful tool. I use it almost exclusively on Linux systems and it would be really handy if I could set a number of options which would always be used when I run rsync. These would be in addition to -a which is useful but not quite enough. In particular I always want to copy extended attributes (-X), ACLs (-A) and hardlinks (-H). I've recently lost a number of extended attributes (not a huge amount but I'd prefer not to repeat the loss). This was almost certainly a result of them being lost when I used rsync to copy some files around. So, is there any way to set some parameters system-wide such that rsync will always use them without them being explicitly set when it's called? The only way I can think of at the moment is to have a wrapper script (or bash function) for rsync that sets the parameters I want. It feels that there should be a better way, is there? -- Chris Green
Paul Slootman
2024-Oct-17 11:12 UTC
Is there any easy way to set some default rsync options?
On Wed 16 Oct 2024, Chris Green via rsync wrote:> > I use it almost exclusively on Linux systems and it would be really > handy if I could set a number of options which would always be used > when I run rsync. These would be in addition to -a which is useful > but not quite enough. > > In particular I always want to copy extended attributes (-X), ACLs > (-A) and hardlinks (-H). > > I've recently lost a number of extended attributes (not a huge amount > but I'd prefer not to repeat the loss). This was almost certainly a > result of them being lost when I used rsync to copy some files around. > > So, is there any way to set some parameters system-wide such that > rsync will always use them without them being explicitly set when it's > called?Search the rsync manual page for popt . You can "overload" the -a option to include the extra options you need; create a file .popt in your home directory and add a line: rsync alias -a -aXAH Paul
Reasonably Related Threads
- Is there any easy way to set some default rsync options?
- Errors compiling rsync 2.5.2 on Solaris 8
- DO NOT REPLY [Bug 5022] New: FreeBSD 4.11 - Compilation Fails - uidlist.c - gcc2 / gcc3
- rsync 2.5.6 for NCR MP-RAS
- 2.5.6pre1 bombs on Sunos4 in popthelp.c on use of sprintf