Follow the below steps to rename a host in BackupPC.
1. Stop BackupPC service :
service backuppc stop
2. Login to the configuration folder
2. Change the host file to the corresponding one :
*change old_host to new_host*
3. Rename the pl file in pc folder :
mv old_host.pl new_host.pl
4. Make the changes in the backup location (I assume your backup is storing in the location /backup):
mv old_host new_host
5.Start Backuppc service:
service backuppc start
6. Login to the backuppc console and make sure that the changes are replicated there.
Edit the configuration in BackupPC is as below :
Edit config –> Backup Settings –> User commands -> DumpPostUserCmd as
/theg/email.sh $xferOK $host $type $client $hostIP $share $XferMethod $sshPath $cmdType
where /theg/email.sh is the custom script.
Below are the contents of the email.sh script :
# script to send simple email
# Email To ?
# Email text/message
# Grab the status variables
# Check if backup succeeded or not.
if [[ $xferOK == 1 ]]; then
# email subject
SUBJECT=”[BackupPC] $STATUS for host: $client”
# Email text/message
echo “Filesystem backup for $host $STATUS” > $EMAILMESSAGE
echo “” >>$EMAILMESSAGE
echo “Type: $type” >>$EMAILMESSAGE
echo “Client: $client” >>$EMAILMESSAGE
echo “Host: $host” >>$EMAILMESSAGE
echo “Host IP: $hostIP” >>$EMAILMESSAGE
echo “Share: $share” >>$EMAILMESSAGE
echo “XferMethod: $XferMethod” >>$EMAILMESSAGE
echo “sshPath: $sshPath” >>$EMAILMESSAGE
echo “cmdType: $cmdType” >>$EMAILMESSAGE
# send an email using /bin/mail
/bin/mail -s “$SUBJECT” “$EMAIL” < $EMAILMESSAGE
I’ve got Forbidden error while accessing the BackupPC machine via browser. Here is what I did :
I started off checking the logs. Here is what I got from the apache error log :
client denied by server configuration: …………………/BackupPC_Admin
So this is clearly something permission issue.
I have checked the configuration file :
and added the correct entry in :
deny from all
allow from 127.0.0.1
allow from 192.168.20.0/24
Save and restart the apache service
Now BackupPC is loading fine in browser….
Enjoy ! 🙂