Hi
I used BackupPC since decades for a dozen of PC (Linux and Windows)
using rsync/tar through ssh. Some hosts are connected through ADSL
connection. It works perfectly well and fully fit my needs.
Recently I decided to duplicate backuppc data on a remote mini server
(OrangePi+2E + 1TB HDD). I created a script to rsync the cpool
directory separately (rsync spended too much time to compute diff
because of the low data rate link). It takes 2 months for the initial
replication! Anyway, it's done and incremental synchronization should
be done in less than an hour per day.
Now I want to start the BackupPc daemon on the replicated data to ease
backup access. So I need to avoid any nightly pool cleaning (it will
be done by my rsync script) and disable backup from any hosts. I use
this configuration settings:
$Conf{WakeupSchedule} = [];
$Conf{MaxBackupPCNightlyJobs} = 0;
$Conf{PoolSizeNightlyUpdatePeriod} = 0;
$Conf{PoolNightlyDigestCheckPercent} = 0;
$Conf{RefCntFsck} = 0;
$Conf{FullPeriod} = -1;
$Conf{BackupsDisable} = 2;
$Conf{EMailNotifyMinDays} = 365;
I'm confident with disabling host backup feature but I'm not sure
those settings fully deactivate nightly pool cleaning. Can someone
correct it ? Thanks in advance
I added my synchronization script and the associated crontable. Every
thing is running on same account (backuppc user).
Regards,
Laurent Mazet
Synchronization script:
--8<--
#!/bin/sh
HOST=mainserver.mydomain.org
RUN=$HOME/sync_backuppc.run
LOG=$HOME/sync_backuppc.log
BACKUP=/var/lib/backuppc
# check disk mountage
mount | grep -q 'on /mnt/volume type' || { echo disk not mounted; exit 1; }
# don't kill old binary
[ -f "$RUN" ] && pid=$(cat $RUN)
if [ "$pid" ]; then
pids=$(pstree -a -p $pid | awk '{sub(/,/, " "); printf("%s%s",
sep, $2); sep=" "}')
#[ "$pids" ] && kill -TERM $pids
if [ "$pids" ]; then
echo "process $pids already running at $(date -R)" >> $LOG
exit 0
fi
fi
echo $$ > $RUN
echo "process $$ starts at $(date -R)" >> $LOG
# sync configuration
rsync -qa $HOST:/etc/backuppc4/hosts /etc/backuppc/
rsync -qa $HOST:/etc/backuppc4/htpasswd /etc/backuppc/
rsync -qa --delete $HOST:/etc/backuppc4/pc/\*.pl /etc/backuppc/pc/
# sync cpool
for d in $(ssh $HOST find $BACKUP/cpool/ -mindepth 2 -maxdepth 2 -type d); do
[ -d "$d" ] || mkdir -p $d
rsync -qa --delete $HOST:$d $d && sync
done
# sync files
rsync -qa --delete $HOST:$BACKUP/pc/ $BACKUP/pc/ && sync
rsync -qa --delete $HOST:$BACKUP/pool/ $BACKUP/pool/ && sync
# clean
rm -f $RUN
echo "process $$ ends at $(date -R)" >> $LOG
-->8--
Associated crontable:
--8<--
31 1 * * * /bin/systemctl stop backuppc; $HOME/bin/sync_backuppc;
/bin/systemctl start backuppc
-->8--
--
Dr. Laurent Mazet -=- "Use the source, Luke" -=- ma...@softndesign.org
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/