Changes

From Amahi Wiki
Jump to: navigation, search
no edit summary
<!--
This page is crated automaticaly by a script.
This part is commented and shall not show
-->
<!--At the top of the page can be vissible one of the following tags..-->
{{WorkInProgress}}
<!--{{NeedsUpdate}}-->
<!--{{NeedsMerge | [[Main Page]]}}-->
<!--{{NeedsExpantion}}-->
<!--{{NeedsDelete |[[Main Page]]}}-->
<!--Please remove or place comment accordingly-->
<!--Your text bellow this line-->
 
This is for those trying to get a synology/xpenology box (source) to backup over the network to an Amahi box (target). I thought that one could fill out the dashboard on the source, and hit the "go" button to start the backup to the HP/Amahi. I found it was not so easy. This is for Amahi 6/ Ubuntu 12.04.
1. Edit the file /etc/default/rsync in the Amahi box to start rsync as daemon using xinetd.
{{Code|Code = sudo nano /etc/default/rsync}} The entry listed below, should be changed from false to inetd.
RSYNC_ENABLE=:The entry listed below, should be changed from false to inetd.
RSYNC_ENABLE=inetd
2. Install xinetd on the Amahi box because it's apparently not installed by default.
{{Code|Code = sudo apt-get -y install xinetd}} 
3. Create the file /etc/xinetd.d/rsync on Amahi box to launch rsync via xinetd.
{{Code|Code = sudo nano /etc/xinetd.d/rsync}}
:It should contain the following lines of text.:
<pre>service rsync <br />{ <br />disable = no <br />socket_type = stream <br />wait = no <br />user = root <br />server = /usr/bin/rsync <br />server_args = --daemon <br />log_on_failure += USERID <br />flags = IPv6 <br />} <br /pre>
:If I have anything other than user = root, I can't get it to work. Don't make it the user below. If I change it to "kevin" (user below) it fails to connect.
4. Create the file /etc/rsyncd.conf configuration on Amahi box to use rsync/daemon.
4. Create the file /etc/rsyncd.conf configuration on Amahi box to use rsync/daemon. {{Code|Code = sudo nano /etc/rsyncd.conf}}
:The file should contain the following.
<pre>max connections = 2 <br />log file = /var/log/rsync.log <br />timeout = 300 <br /> <br />[datashare] <br />comment = Data backup share <br />path = /var/hda/files/data <br />read only = no <br />list = yes <br />uid = kevin <br />gid = nogroup <br />auth users = kevin <br />secrets file = /etc/rsyncd.secrets <br />
I made auth user [datashare] comment = Data backup share path = /var/hda/files/data read only = no list = kevin and yesuid = kevin. "gid = nogroupauth users = kevin" is an amahi user with admin checked (in the user area of Amahi dashboard). For multiple shares to backup to, just copy the "destination module" created by [datashare] above, and paste and edit. In my case I have 4 shares: data, media, backup, autocad. So, I have 4 modules in the secrets file = /etc/rsyncd.conf file.secrets </pre>
:I made auth user = kevin and uid = kevin. "kevin" is an amahi user with admin checked (in the user area of Amahi dashboard). For multiple shares to backup to, just copy the "destination module" created by [datashare] above, and paste and edit. In my case I have 4 shares: data, media, backup, autocad. So, I have 4 modules in the rsyncd.conf file.
5. Create /etc/rsyncd.secrets on Amahi box for user's password.
{{Code|Code = sudo nano /etc/rsyncd.secrets}} User should be the same as above, with password the one used to log into/ SSH into the HP/Amahi box. Format is user:password, like below. kevin:theuserpassword
:User should be the same as above, with password the one used to log into/ SSH into the HP/Amahi box. Format is user:password, like below.
:<pre>kevin:theuserpassword</pre>
6. Then set the file permissions for rsyncd.secrets on the Amahi box.
{{Code|Code = sudo chmod 600 /etc/rsyncd.secrets}}  
7. Start/Restart xinetd
{{Code|Code = sudo /etc/init.d/xinetd restart}}
:not sure if this was needed, but what the heck.
Now for the source side of things:
# In the xpenology box, load the dashboard/web interface --> mainmenu/backup and replication.
# click "backup destination"
# click "create"
# pick "network destination / rsync compatible" then NEXT
# Name it something you'll understand ... in my case: "data share on Amahi"
# IP address (self explanatory)
# user: kevin
# password: theuserpassword
# backup module: datashare (if you made 4 modules like I did, all 4 are available for selection as backup targets)
# hit APPLY. If it doesn't work, check the user and passwords.
# Do the other modules in the same manner
Now for the source side of things: 1. In , to setup a backup job on the xpenology box, load the dashboard/web interface --> mainmenu/backup and replication. <br />:2. # click "backup destination" <br />3. click , then "create" <br />4. pick , then "network destination / rsync compatibledata backup task" then # select the folders to backup (pick one with little data or a test folder to make sure it works)# select one of the backup destinations you just created and hit NEXT <br />5. Name it something you'll understand ... in my case: # name the task, say "backup of data share on to Amahi" <br />6. IP address (self explanatory) <br /># name the directory on the Amahi share where the backup is going7# side note: here's where it got interesting. if I leave metadata and thumbnails selected or unselected and I have "kevin" as the user: kevin <br />8, it works fine. password: theuserpassword <br />9If I have "rsync" as the user with admin permission (as when I was experimenting with the setup) and have the above 2 things selected, the files came over with protections. backup module: datashare I couldn't delete some folders of the test run (if you made 4 modules like I did, all 4 are available for selection as backup targetsthink the metadata ones) <br />10. hit APPLYI'd have to chmod them to be able to delete them. When I deselected them they were deletable. Someone better than me at this can tell me why. If it doesnAnyhow, I can't worksee why you'd really need it, check the user so deselect them and passwordsgive it a shot. <br />11. Do the other modules in the same manner <br /># then hit APPLY
 
Now, to setup a backup job on the xpenology box:
1. click "backup" , then "create", then "data backup task" <br />
2. select the folders to backup (pick one with little data or a test folder to make sure it works) <br />
3. select one of the backup destinations you just created and hit NEXT <br />
4. name the task, say "backup of data to Amahi" <br />
5. name the directory on the Amahi share where the backup is going <br />
6. side note: here's where it got interesting. if I leave metadata and thumbnails selected or unselected and I have "kevin" as the user, it works fine. If I have "rsync" as the user with admin permission (as when I was experimenting with the setup) and have the above 2 things selected, the files came over with protections. I couldn't delete some folders of the test run (I think the metadata ones). I'd have to chmod them to be able to delete them. When I deselected them they were deletable. Someone better than me at this can tell me why. Anyhow, I can't see why you'd really need it, so deselect them and give it a shot. <br />
7. then hit APPLY <br />
Do a "backup now" to see if it works and that you can delete the backup directory (no odd permissions). If it works, then you can edit the backup task and put a schedule on it.
I think I captured everything I did accurately, and I hope that helps someone.
 
 
<!--Your text above this line-->
<!--This page must bellong to one of the following categories please remove comment-->
<!--[[category:Apps]]-->
<!--[[Category:Fedora]]-->
<!--[[Category:Platform]]-->
<!--[[Category:Pro Version]]-->
<!--[[Category:Services]]-->
<!--[[Category:VPN]]-->
12,424

edits