Advertisement
Guest User

Untitled

a guest
May 21st, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.33 KB | None | 0 0
  1. Thanks so much for the help..i was out of town and I am going to try to do this today, I have a few questions: (please be kind enough to understand that I am a newbie and might ask some stupid questions:
  2. 1) I do not believe I have a “group name”, how can I be sure about that, if I do not have one, then what should I place there.
  3.  
  4. your group name (gid) should be the same as your user nam, a simple way to find out is to open a terminal and type ls -la, this will show your user and group names.
  5.  
  6. 2) If I try to do multiple computers then it will be like: [share1] (or whatever name I call the share, [share2], etc…and in the comment I am assuming this is a comment about the share, ie comment = computer of room 1
  7.  
  8. The comment is only for what the directory is for, eg: if you only back up one computer to that directory, the comment could be "backup of willy" I name my computers then alias the ip address in /etc/hosts, that way I don't have to remember an ip address.
  9.  
  10. 3) I am assuming that /etc/rsyncd.secrets is hide since there is were we create the password, is this something similar to what I created (see below) and if weverything works well, then I can just delete from the one I did before the lines of the /etc/fstab and the file on /root/.credentials that hold the password..(please see below)…Thanks for the help..Rafael
  11.  
  12. the rsyncd.secrets file has a permission of 600, this only allows the owner read/write permissions, in this case the owner is root, so only he can read the file, if you try to read it as another user, permission will be denied.
  13.  
  14. max connections = 2
  15. log file = /var/log/rsync.log
  16. timeout = 300
  17. [share]
  18. comment = private share
  19. path = /home/share
  20. read only = no
  21. list = yes
  22. uid = user name
  23. gid = user group
  24. auth users = user name
  25. secrets file = /etc/rsyncd.secrets
  26. Save the file as /etc/rsyncd.conf. You’ll see in the above file that I have create a directory in /home called share, to create the directory you can either use nautilus as root and create the directory, press Alt-F2 and type:
  27. gksu nautilus
  28. or create it in a terminal:
  29. sudo mkdir /home/share
  30. I’ve given the directory a permission of 700 so that only the creator and root can access the files, thus keeping them private from other users. I find the easiest way to set permissions is in a terminal To make sure you are the owner type:
  31. sudo chown -R user:user /home/share
  32. then change the permissions:
  33. sudo chmod -R 700 /home/share
  34. The next step is to create /etc/rsyncd.secrets for the user’s password. The user should be the same as above with password the one used to log into the Ubuntu server/computer.
  35. gksu gedit /etc/rsyncd.secrets
  36. the contents should be:
  37. user:password
  38. Next set the permissions for /etc/rsyncd.secrets:
  39. sudo chmod 600 /etc/rsyncd.secrets
  40. Finally start/restart xinetd
  41. sudo /etc/init.d/xinetd restart
  42. That’s all you need to do to set up the rsync-daemon on your Ubuntu system.
  43. Sudo nano /etc/fstab add this to the end line and create a memo like # automatic samba
  44. //192.168.1.101/serverbackup /home/rgotten/mnt cifs credentials=/root/.credentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
  45. //192.168.1.106/Charts /home/rgotten/charts.windows cifs credentials=/root/.credentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
  46. //192.168.1.105/Myplasticare\040Pictures /home/rgotten/FrontDesk.Windows cifs credentials=/root/.credentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
  47. Note \040 is a to mark the space between the two words at Myplasticare Pictures
  48.  
  49. Remember to create a protected password:
  50.  
  51. /root/.credentials is a text file that contains your smb username and password. To create the file, type:
  52. Code:
  53. sudo nano /root/.credentials
  54. and add the following text:
  55. Code:
  56. username=your_smb_username
  57. password=your_smb_password
  58. Now, make the file only readable by root:
  59. Code:
  60. sudo chmod 600 /root/.credentials
  61. 6. At this point, you can either reboot or reload your fstab:
  62. Code:
  63. sudo shutdown -r now
  64.  
  65. You don't need the samba section for the backup, if you already have the other shares mounted. then all you really need to do is use rsync to backup selected directories. You could use something like: rsync -av /home/rgotten/FrontDesk.Windows /backup-directory, then create a cron job to automate the whole thing.
  66.  
  67. Using DeltaCopy you don't need the Windows share to be mount on the computer running Ubuntu.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement