Difference between revisions of "Backup Windows Computers Using Affa"

From SME Server
Jump to navigationJump to search
(Added note that this methiod of backup can require significant more network traffic when comapared to a local rsyncd.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
==About this document==
 +
This document describes a method to backup Windows computer by mounting a Windows file share to the Affa server. No additional software installation is required on the Windows computer.
 +
 +
An alternative method using the Rsync daemon protocol is described here: [[Affa#Backing_up_a_Windows_computer]]. This requires the Cygwin rsyncd service running on the Windows computer.
 +
 +
{{Note box|This method of backup using a windows share may require significantly more network traffic compared to the rsync daemon method. For example to be backed up if a file is almost similar, an rsyncd on the local PC can calculated checksums of chunks of the file. This is then compared to the remote copy of the file to work out which parts needs transferring. In the share method described in this HOWTO, there is no local processing function (there is only the share through which a file can be copied) and the remote rsyncd on the server performing the backup of the network share will need to transfer the whole file over the network to perform this calculation before being able to do the actual backup.}}
 +
 
==Important Note about backing up Windows data==
 
==Important Note about backing up Windows data==
 
Affa does ''not'' backup windows ACL (Access Control List) information.  You will need to correct your windows ACLs after doing any restore from affa!
 
Affa does ''not'' backup windows ACL (Access Control List) information.  You will need to correct your windows ACLs after doing any restore from affa!
Line 46: Line 53:
  
 
This command should display the content you are trying to backup:
 
This command should display the content you are trying to backup:
  ls "'db affa getprop jobname Include[0]'"
+
  ls `db affa getprop jobname Include[0]`
 
 
  
 
===5. Test your backup job===
 
===5. Test your backup job===
Line 53: Line 59:
  
 
==Remote Windows Computers==
 
==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===
 
===Using a remote SME===
Line 63: Line 67:
 
I have successfully configured Ubuntu 6.10 under VMWare to backup remote Windows computers using this 63MB VM: http://www.vmware.com/vmtn/appliances/directory/648
 
I have successfully configured Ubuntu 6.10 under VMWare to backup remote Windows computers using this 63MB VM: http://www.vmware.com/vmtn/appliances/directory/648
 
{{Incomplete}}
 
{{Incomplete}}
 +
 +
[[Category:Howto]]
 +
[[Category: Backup]]

Latest revision as of 08:07, 25 December 2010

About this document

This document describes a method to backup Windows computer by mounting a Windows file share to the Affa server. No additional software installation is required on the Windows computer.

An alternative method using the Rsync daemon protocol is described here: Affa#Backing_up_a_Windows_computer. This requires the Cygwin rsyncd service running on the Windows computer.


Important.png Note:
This method of backup using a windows share may require significantly more network traffic compared to the rsync daemon method. For example to be backed up if a file is almost similar, an rsyncd on the local PC can calculated checksums of chunks of the file. This is then compared to the remote copy of the file to work out which parts needs transferring. In the share method described in this HOWTO, there is no local processing function (there is only the share through which a file can be copied) and the remote rsyncd on the server performing the backup of the network share will need to transfer the whole file over the network to perform this calculation before being able to do the actual backup.


Important Note about backing up Windows data

Affa does not backup windows ACL (Access Control List) information. You will need to correct your windows ACLs after doing any restore from 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 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.

Incomplete.png Incomplete:
This article or section needs to be expanded. Please help to fill the gaps or discuss the issue on the talk page


Using VMWare

I have successfully configured Ubuntu 6.10 under VMWare to backup remote Windows computers using this 63MB VM: http://www.vmware.com/vmtn/appliances/directory/648

Incomplete.png Incomplete:
This article or section needs to be expanded. Please help to fill the gaps or discuss the issue on the talk page