Re: [BackupPC-users] Generating folders to backup from script
2010-11-30 17:14:42
Here's how I solved a similar case. I had to do it on the client side.
I wanted to back up files less than 16MB on two raid arrays:
In the client's root crontab:
# m h dom mon dow command
0 * * * * find /raid4 -size +16M | sed -e 's/\/raid4\///' >
/etc/rsyncd.raid4.excludes
0 * * * * find /raid5 -size +16M | sed -e 's/\/raid5\///' >
/etc/rsyncd.raid5.excludes
50 * * * * RSYNC_PROCS=`ps -ef |grep /usr/bin/rsync | grep -v grep | wc
-l` ; if [ $RSYNC_PROCS == "1" ] ; then service rsyncd restart ; fi
The top two cron jobs generate excludes, and the last one restarts rsync
hourly to catch the new excludes if no client is connected.
In the client rsyncd.conf:
uid = root
pid file = /var/run/rsyncd.pid
use chroot = no
read only = yes
transfer logging = true
log format = %h %o %f %l %b
log file = /var/log/rsyncd.log
slp refresh = 900
secrets file = /etc/rsyncd.secrets
[raid4]
path = /raid4
comment = Backup
read only = yes
auth users = backuppc
exclude from = /etc/rsyncd.raid4.excludes
[raid5]
path = /raid5
comment = Backup
read only = yes
auth users = backuppc
exclude from = /etc/rsyncd.raid5.excludes
Richard
On 11/26/2010 05:31 AM, Cyril Lavier wrote:
> Hi.
>
> I need to backup some folders on a server, which are not static, and I
> usually generate the folder list using a command (find).
>
> On the documentation, I can't find anything on using a command to
> generate the folder list.
>
> I tried some things, like putting a command which edits the .pl file in
> $Conf{DumpPreUserCmd}, but it doesn't seems to work.
>
> If you have any idea, this could help me.
>
> Thanks.
>
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
|
|
|