Hello, I get some troubles when rsyncing my FreeBSD 6.2 server from my iMac Leopard desktop. Below what I configured in rsyncd.conf .. [all] path = / uid = root gid = wheel read only = true include from = /home/rsync/etc/includes/rootfs /home/rsync/etc/includes/rootfs + /etc + /etc/make.conf + /boot + /boot/* - * This is the only way I found to only backup files directories I would like having on my backup system. This is working but I get a problem with it. Is this really the way to do it ?? Lines specified above are just a example. Let's immagine I would like to backup complete /usr/local/ directory. In such a way I should add two entries for each subdirectory .. /usr/local/bin /usr/local/bin/* You can really immagine my rootfs file contains thousands of lines .. this is why I post this message because I can immagine there is an easy way to do it but I haven't found it rigth now. Thanks to help me.
On Tue, 2007-12-25 at 14:48 +0100, Vincent Blondel wrote:> Below what I configured in rsyncd.conf .. > > [all] > path = / > uid = root > gid = wheel > read only = true > include from = /home/rsync/etc/includes/rootfs > > /home/rsync/etc/includes/rootfs > > + /etc > + /etc/make.confGood, you understand the need to include everything along the way to a file.> + /boot > + /boot/* > - * > > This is the only way I found to only backup files directories I would like > having on my backup system. This is working but I get a problem with it. > > Is this really the way to do it ???No. You are using daemon filters, which are designed primarily as a way for a daemon administrator to block access to files that clients shouldn't see or mess with. It would be more appropriate for the backup system to choose which directories it wants using ordinary filters, i.e., --include-from=path/to/includes/rootfs on the client command line. Using a --files-from file (which the backup system can even read from the remote system) with -r may be even more convenient than filters.> Let's immagine I would like to backup complete /usr/local/ > directory. In such a way I should add two entries for each subdirectory .. > > /usr/local/bin > /usr/local/bin/* > > You can really immagine my rootfs file contains thousands of lines .. this > is why I post this message because I can immagine there is an easy way to > do it but I haven't found it rigth now.Yes, use a filter pattern ending in /*** to match a directory and everything recursively inside it: + /usr/local/*** Matt
Hi Matt, Sorry for the delayed answer. I was just a few days away for holiday. I just tested and this is now working the way I expected. Regards Vincent. On Tue, 2007-12-25 at 14:48 +0100, Vincent Blondel wrote:> Below what I configured in rsyncd.conf .. > > [all] > path = / > uid = root > gid = wheel > read only = true > include from = /home/rsync/etc/includes/rootfs > > /home/rsync/etc/includes/rootfs > > + /etc > + /etc/make.confGood, you understand the need to include everything along the way to a file.> + /boot > + /boot/* > - * > > This is the only way I found to only backup files directories I would > like > having on my backup system. This is working but I get a problem with it. > > Is this really the way to do it ?????No. You are using daemon filters, which are designed primarily as a way for a daemon administrator to block access to files that clients shouldn't see or mess with. It would be more appropriate for the backup system to choose which directories it wants using ordinary filters, i.e., --include-from=path/to/includes/rootfs on the client command line. Using a --files-from file (which the backup system can even read from the remote system) with -r may be even more convenient than filters.> Let's immagine I would like to backup complete /usr/local/ > directory. In such a way I should add two entries for each subdirectory > .. > > /usr/local/bin > /usr/local/bin/* > > You can really immagine my rootfs file contains thousands of lines .. > this > is why I post this message because I can immagine there is an easy way > to > do it but I haven't found it rigth now.Yes, use a filter pattern ending in /*** to match a directory and everything recursively inside it: + /usr/local/*** Matt