Re: wildcards and nested files

2013-07-02 Thread Steven Levine
In , on 07/02/13 at 12:25 PM, Grant said: Hi, >> rsync -azvi --exclude-from=excludes.txt --delete --delete-excluded / >> user@hostname: >> excludes.txt: >> + / >> + /etc >> + /etc/** >> + /home >> + /home/*/ >> + /home/*/.maildir/ >> + /home/*/.maildir/** >> - - * >So the includes are in e

Re: wildcards and nested files

2013-07-02 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/02/13 15:25, Grant wrote: >> Anyways, the other way to do what you are asking is: rsync -azvi >> --exclude-from=excludes.txt --delete --delete-excluded / >> user@hostname: >> >> excludes.txt: + / + /etc + /etc/** + /home + /home/*/ + >> /home/*

Re: wildcards and nested files

2013-07-02 Thread Grant
> Anyways, the other way to do what you are asking is: > rsync -azvi --exclude-from=excludes.txt --delete --delete-excluded / > user@hostname: > > excludes.txt: > + / > + /etc > + /etc/** > + /home > + /home/*/ > + /home/*/.maildir/ > + /home/*/.maildir/** > - - * So the includes are in excludes.t

Re: wildcards and nested files

2013-07-02 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 No, that is a consequence of using a * on the command line. The shell would expand "/home/*/.maildir" to a list of all matching paths. When you delete a user their /home/username will no longer exist so that pattern will no longer match and their dir

Re: wildcards and nested files

2013-07-02 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --files-from is a specific list of files to sync. It is designed with the idea of being generated by find. Anyways, the other way to do what you are asking is: rsync -azvi --exclude-from=excludes.txt --delete --delete-excluded / user@hostname: exc

Re: wildcards and nested files

2013-07-02 Thread Grant
> I forgot the --delete. Also, note that it will not delete an entire > account that you have deleted from the source as /home/* will no > longer match them. You're saying if I rsync /home/user and then delete /home/user from the source and rsync again with --delete, it won't delete /home/user fr

Re: wildcards and nested files

2013-07-02 Thread Grant
> rsync -aRzv /etc /home/*/.maildir rsyncuser@hostname: I'd actually like to use --files-from so it's easier to manage and --files-from doesn't support wildcards. That's why it gets so messy. - Grant >> I'm trying to use wildcards and nested files and I think there must >> be a better way than

Re: wildcards and nested files

2013-07-02 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I forgot the --delete. Also, note that it will not delete an entire account that you have deleted from the source as /home/* will no longer match them. On 07/02/13 12:29, Kevin Korb wrote: > rsync -aRzv /etc /home/*/.maildir rsyncuser@hostname: > >

Re: wildcards and nested files

2013-07-02 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 rsync -aRzv /etc /home/*/.maildir rsyncuser@hostname: On 07/02/13 08:17, Grant wrote: > I'm trying to use wildcards and nested files and I think there must > be a better way than what I'm doing. If I want to copy only these > two directories: > > /e

wildcards and nested files

2013-07-02 Thread Grant
I'm trying to use wildcards and nested files and I think there must be a better way than what I'm doing. If I want to copy only these two directories: /etc /home/*/.maildir Is this the best way to do it: rsync -arzv --delete-excluded --files-from 'files-from.txt' --include-from 'include-from.tx

Re: rsync won't hit the target

2013-07-02 Thread Grant
> 1 Why not just: rsync -avz --delete /etc/ > user@hostname:/home/user/backup/etc/ Thanks, I switched it. > 2 Check to see if the user is forced into rrsync on the remote in > their ~/.ssh/authorized_keys or /etc/sshd_config or as their shell in > /etc/passwd That was it. The path specified o