I just upgraded from Ubuntu 10.04 to Ubuntu 12.04 and sbackupd is completely gone. I used to call sbackupd from two cron jobs /etc/cron.d/sbackup1
and /etc/cron.d/sbackup2
as root with custom config paths in Ubuntu 10.04. Has sbackupd been renamed to something else? Also, if I run sbackup standalone script as a normal user, it will refuse to backup root owned dirs (i.e. /etc
) What is the alternative?
Asked
Active
Viewed 382 times
0
1 Answers
0
Just dbus-launch
per session before calling sbackup in your cron job as root.
Here is my full workaround to getting sbackup working with custom config files
as a root cronjob. (I have 2 daily sbackup cronjobs at scheduled at different times
to different external drives) Listed below are the relevant 3 files to one of the backup
cronjobs.
Bash script to launch shell session dbus
##########################################################
# "/home/dtoader/My Documents/linux/backups/launchDbus.sh"
##########################################################
#!/bin/bash
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
## if not found, launch a new one
eval `dbus-launch --sh-syntax --exit-with-session`
echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
fi
My custom sbackup.conf file
##########################################################
# "/home/dtoader/My Documents/linux/backups/sbackup500.conf"
##########################################################
[general]
maxincrement = 1
format = 1
followlinks = 0
target = /home/backup500/files
purge = 5
mountdir = /home/dtoader/.local/share/sbackup/mountdir500
lockfile = /var/lock/sbackup/sbackup500.lock
splitsize = 0
[exclude]
regex = \.xxxxxxxxxx
maxsize = 9999220736
[log]
level = 20
file = /home/dtoader/.local/share/sbackup/log/sbackup500.log
[places]
prefix = /usr
[schedule]
[dirconfig]
/home/dtoader = 1
/root = 1
/etc = 1
/home/backup501 = 0
/home/backup500 = 0
/home/dtoader/.pulse = 0
[report]
from = SBackup Daemon <None@dtoader-desktop.ext>
My cronjob file
##########################################################
#"/etc/cron.d/sbackup500"
##########################################################
# /etc/cron.d/sbackup500
# At 12 PM every day
# m h dom mon dow user command
0 12 * * * root "/home/dtoader/My Documents/linux/backups/launchDbus.sh"; /usr/bin/sbackup --no-indicator --no-dbus --conf="/home/dtoader/My Documents/linux/backups/sbackup500.conf"