Backing up linux ubuntu intranet stuff to central windows server using rsync and smbfs. I did this as follows:
- Create new windows user with limited priviledges, apart from writing backup files. The intranet server will have permanent access to the windows server and access priviledges should not be too generous.
-
Install smbfs:
sudo apt-get install smbfs
-
Add following to /etc/fstab
uid and gid are necessary to get write permission.
//{server name}/{share name} /mnt/{target} smbfs rw,username={windows username}, \ password={windows password},uid={linux username},gid={linux username} 0 0 -
Mount share:
sudo mount /mnt/{target} - Create a backup directory on the windows server. Since it is only a backup I made this compressed.
-
Add a cron entry to copy stuff over every night:
Windows does not like file names that start with a . so I exclude these.
34 3 * * 1-5 rsync -a --delete --exclude="\\.*" \ /home/pcw/StuffToBackup/ /mnt/{target}/users/PCW/BACKUP
Twitterings

Thanks bud. Now I don't have to rely on the incompetent IT people to backup my documentation (they left it not backing up for 3 months)