9. Networks :: Backup Windows

Backing up windows PC and Laptops off your network.

First some commands from the Linux CLI

smbclient -L server -I 192.168.0.1 -U remote%passwd

Where -L is the PCs netbios name

Where -I is it's IP address

Where -U is the PCs username

Where % means use the following password.

This command will give you access to the HD of the PC being interrigated.

OR

smbclient //theway/C$ apasswd -U administrator -I 192.188.2.261 -W WORKGROUP

(yes I know the IP can not exist, make sure you put in one that can)

 

To copy files form this PC to the server, to the users backup area.

 

We will use the backup program in aiContact called rsync_nfs_backups.py

To set this up:

  1. Make a directory in /mnt/ with the name of the PC to be backed up i.e. /mnt/theway
  2. Make a file in this directory called iamhere i.e. touch /mnt/theway/iamhere
    This is used to know when "theway" is or is not mounted for backing up.
  3. In /var/www/aicontact/configuration/python.cfg create a section called [nfs_backups] with an item list = theway principal
  4. The "list" is a list of computer names that we are going to be backing up.
  5. Each item in the "list" will not need it's own section in /var/www/aicontact/configuration/python.cfg
    1. The name of the section will be the same as the name from the list [theway]
    2. active = yes # or no if this backup is not to run
    3. localnotmounted = iamhere # if during the backup we see this file, then we know that the mount failed
    4. putfqdn = /home/auser/ # the name of the location where to put the files (different syntax if remote)
    5. putrsync =  # not used at all for a localhost backup, do not even have this line in the cfg file
    6. putdir = files # directory to put the backup into, relates to putfqdn
    7. putpasswd = none # passwd needed to access the put server, generally none
    8. getuser = administrator # name of the user to use to get the files off the PC, normall administrator and this must be active on the PC
    9. getpasswd = mypasswd # password for the user above
    10. getfqdn = 192.168.0.0 # best to use ip addres and make sure it is static via dhcp
    11. getdir = Users # the share on the remote PC that we are going to mount
    12. getsubdir = /strider/Documents/ # space space seperated list of directories to get
    13. mountdir = /mnt/theway/ # where to mount the PC on the server
    14. mounttype = samba # type of mount, nomrally samba
    15. reportfqdn = localhost # the name of the server where to report the putting of the files
    16. schedule = 13 # the hour of the day to do the backup
    17. email = me@somewhere you@somewhere # list of email addresses to send report to
    18. speedsync = 100 # speed to do backup at