Difference between revisions of "Backup Windows Computers Using Affa"
(Backup Windows Computers Using Affa) |
(No difference)
|
Revision as of 20:01, 6 July 2007
Backup Windows Computers Using Affa
LOCAL Windows Computers
You can backup Windows workstations or servers that are on your affa server's local network using affa's 'Automount' functionality to mount a share from your windows box, then back it up from the mount point into affa's managed backup store.
Set the following affa options for 'jobname':
db affa set jobname job db affa setprop jobname AutomountDevice '//192.168.x.y/c$' db affa setprop jobname AutomountPoint '/mnt/jobname' db affa setprop jobname AutomountOptions '-t cifs -o credentials=/root/.pwdfile.jobname' db affa setprop jobname remoteHostName localhost db affa setprop jobname Include[0] '/mnt/jobname' db affa setprop jobname SMEServer no # THIS IS A MUST db affa setprop jobname TimeSchedule 2230 db affa setprop jobname status enabled db affa setprop jobname Debug yes # OPTIONAL, BUT USEFUL
where:
- jobname job: create the affa job named jobname
- AutomountDevice '//192.168.x.y/c$': mount the share 'c$' on the computer '192.168.x.y'
- AutomountPoint '/mnt/jobname': where affa should mount your Windows share during backup.
- AutomountOptions '-t cifs -o credentials=/root/.pwdfile.jobname': use the cifs protocol and look in /root/.pwdfile.jobname for the windows username and password needed to login to your windows system.
- remoteHostName localhost: backup data is mounted locally on your affa server.
- Include[0] '/mnt/jobname': backup the entire contents of your specified windows share. You can mount the C: drive as shown here, then backup only the "Documents and Settings" directory by using "Include[0] '/mnt/jobname/Documents and Settings'". Capitalization is important!
- SMEServer no: don't run SME specific pre-backup scripts.
- TimeSchedule 2230: backup at 10:30pm daily
- status enabled:
Create your mount.cifs credentials file
'.pwdfile.jobname' is a text file containing two lines, one saying "username=xxx" and the other saying "password=yyy", where xxx and yyy are the user account and password required to login to the windows system. There must be a newline at the end of windowspwd or mount.cifs generates an error. Create the file using:
mcedit /root/.pwdfile.jobname
And add the following content to the file:
username=windowsuser password=windowspwd
Run the following command to ensure that .pwdfile.jobname can only be read by the root user:
chmod 600 /root/.pwdfile.jobname
Create your mount and test your affa mount instructions
mkdir /mnt/jobname mount `db affa getprop jobname AutomountOptions` \ `db affa getprop jobname AutomountDevice` \ `db affa getprop jobname AutomountPoint`
This command should display the content you are trying to backup:
ls "'db affa getprop jobname Include[0]'"
5. Test your backup job
affa --run jobname
Remote Windows Computers
Using Cygwin
There is a problem with ssh-invoked rsync under cygwin that causes timeouts. This issue is not well documented on the cygwin forums.
Using a remote SME
If you have a SME server at your remote location you can install affa on that server, use it to backup the Windows workstations at that office, then use affa to pull those backups back to your main affa server.
Using VMWare
I have successfully configured Ubuntu 6.10 under VMWare to backup remote Windows computers.