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