Tomasz Chmielewski wrote:
I just read what BackupPC can do, and it just seems to me it's quite a
good tool, with which I could replace my own rsync/hardlink scripts.
BackupPC has quite an extensive documentation, but what I failed to find
are... examples.
I would like to backup individual hosts, both Windows and Linux.
For example, I'd like to backup:
1) Windows Machine via smb
IP: 192.168.1.1
user (is Admin): backup
pass: password
Shares: O$, P$, R$
2) Linux machine via rsync:
IP: 192.168.2.2
user (has 0 UID): backup
pass: password
Backup everything, but /proc and /var/log/squid/*
Noone answered, I guess the question wasn't that hard, was it?
In that case I'm putting my values, but it'd be best if someone in
charge of this project put some examples in FAQ...
Linux backup via rsync (you have to generate keys for password-less
login - than make sure user backup can login without a password):
[EMAIL PROTECTED] ssh -l backupuser server
[EMAIL PROTECTED]
backupuser is a user with UID 0 (root equivalent, but can only login
using keys in my case).
Here comes the config:
$Conf{XferMethod} = 'rsync';
$Conf{RsyncClientPath} = '/usr/bin/rsync';
$Conf{RsyncClientCmd} = '$sshPath -q -x -l backupuser $host $rsyncPath
$argList+';
$Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l backupuser $host
$rsyncPath $argList+';
$Conf{RsyncShareName} = [
'/',
];
$Conf{RsyncArgs} = [
'--verbose',
'--numeric-ids',
'--perms',
'--owner',
'--group',
'--devices',
'--links',
'--times',
'--block-size=2048',
'--recursive',
'--exclude', '/proc/*',
'--exclude', '/mnt/*',
'--exclude', '/tmp/*'
];
$Conf{RsyncRestoreArgs} = [
'--numeric-ids',
'--perms',
'--owner',
'--group',
'--devices',
'--links',
'--times',
'--block-size=2048',
'--relative',
'--ignore-times',
'--recursive'
];
Windows 2003 backup via smb. I made a backup of the whole C: drive,
which was mapped as S$ using vshadow [1]:
$Conf{XferMethod} = 'smb';
$Conf{XferLogLevel} = 1;
$Conf{ArchiveComp} = 'bzip2';
$Conf{CompressLevel} = 9;
$Conf{PingMaxMsec} = 200;
$Conf{SmbShareName} = 'S$';
$Conf{SmbShareUserName} = 'Administrator';
$Conf{SmbSharePasswd} = 'password';
Here is a short makeshadow.cmd script I use to map the drive, I start it
from the Samba server via cmdat (in cron, once a day):
rmtshare \\server\s$ /delete
echo y|C:\backup\shadow\vshadow.exe -da
call C:\backup\shadow\CreateShadow.cmd C: S:
rmtshare \\server\S$=S:\ /grant administrators
Here is the syntax for cmdat [2]:
/opt/cmdat/bin/cmdat -S 192.168.7.8 -W CONTACT -U
'Administrator%password' -c 'at now C:\backup\shadow\makeshadow.cmd'
[1] http://blogs.msdn.com/adioltean/archive/2005/01/20/357836.aspx
[2] cmdat is a tool for starting commands using at on Windows machines
remotely, from the Samba server. It is available in samba-tng (you have
to compile samba-tng, and you can use cmdat with "normal" Samba, just
copy the binary + libraries it needs.
--
Tomasz Chmielewski
Automated software deployment with Samba
http://wpkg.org
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/