It's going to take a few days but it will have an exact replica of the Samba Server on the Rsync Server and you don't have to have any clients installed on other machines for Rsync to work all you need is Administrative credentials on the machine you are going to Rsync with.
Once I've figured all of this out I will be setting my Rsync box to start backing up automatically every night (full backup) and also when a file is changed on the Samba Server, I'm going to try and figure out the latter as I havem't figured out how Rsync will be able to detect that A file has changed or been removed etc and so to backup accordingly, once I have done so though I'm sure it's going to be very handy, also I'll be setting the Rsync box to backup all of the the user areas and profiles held on the DC's and also the Users folder on the PC's.
First create a folder on your Centos box in which you can mount the drive you want to backup, for example I created the folder mount_tmp and mounted our Samba share onto this folder.
The commands I have been using so far are:
mount -t cifs \\\\<ip address>\\sharename /mount_tmp -o user=<username on remote machine>%<password>
That command will mount the remote drive onto the backup folder, make sure you have administrative rights on the remote machine and use the correct username and password, to start to Rsync you'll want to create another folder on your CentOS box to actually back upto so I created A folder called Backup. To Rsync I sue the following command.
rsync --progress --stats -v -r /mount_tmp/* /backup
this will start backing up the mount on the mount_tmp folder, you can read the Rsync Man pages to find out what the switches are but from memory -v enables verbosity and -r means recursive directories << you must use -r to backup folders & directories, and don't forget to use --progress and --stats as this will show you the percentage of files copied to the Backup folder.
After all that is done I will us the df -h commnad to check drive space.
I hope this blog helps you, it has been an interesting journey with Rsync this is the first time I've used it.
Thanks for looking.
- Read more...
- 0 comments
- 4,375 views
