Help using Backup & Restore Utility with Linux

Backup and data protection discussion at its finest.

Moderator: Lillian.W@AST

dmtparker
Posts: 27
youtube meble na wymiar Warszawa
Joined: Wed Aug 04, 2021 10:56 pm

Help using Backup & Restore Utility with Linux

Post by dmtparker »

I just got my AS1002T v2 and am trying to use it to backup my Linux box. Using the Backup & Restore utility that comes with the NAS, I cannot create a new backup. With either rsync or ftp, when I enter the host info, I always get "Connection refused by remote site. (Ref. 5606)" I have tried using root & password and also my account on the box and password, also tried my account and password from the NAS but didn't expect that to work. I suppose it could be the 'port 873' but I have no idea what port anything wants to use.
FWIW, I can connect from my Linux box to the NAS using ftp and transfer files manually.
Any help appreciated!
User avatar
Nazar78
Posts: 2002
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Help using Backup & Restore Utility with Linux

Post by Nazar78 »

Is your linux box setup properly for either ftp server port 21 or rsync server port 873? Any firewall rules on the linux box?

The problem here seems is not the NAS but either your network or linux box. You can easily check from another PC if you can access those ports using e.g. telnet linux-box-ip 21 or 873 see if you got response or even from your mobile using specific apps like an actual ftp client or connectbot.
Screenshot_20210805-231008_ConnectBot.jpg
Screenshot_20210805-231008_ConnectBot.jpg (288.27 KiB) Viewed 4275 times
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
dmtparker
Posts: 27
Joined: Wed Aug 04, 2021 10:56 pm

Re: Help using Backup & Restore Utility with Linux

Post by dmtparker »

I think you have id'd the problem. Using my laptop (also linux) from a terminal I tried "telnet 192.168.1.3:21 and got "Couls not resolve 192.168.1.3:21/telnet: Name or service not known." Same results for :873. also tried /21 & /873 (I think it is :port, isn't it?)
Now how do I fix it?
User avatar
Nazar78
Posts: 2002
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Help using Backup & Restore Utility with Linux

Post by Nazar78 »

Using command line tools such as telnet or netcat, don't include the colon ":". Just type "telnet 192.168.1.3 21". If you get a timeout, check the IP and subnet. If you get connection refused, check destination firewall. Since you're using debian based linux refer here to temporarily disable its firewall to troubleshoot https://www.cyberciti.biz/faq/linux-dis ... l-command/. Also possibly look at any iptables filters the linux box might have, I'm not sure as I'm not using that device.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
dmtparker
Posts: 27
Joined: Wed Aug 04, 2021 10:56 pm

Re: Help using Backup & Restore Utility with Linux

Post by dmtparker »

Thanks for the help. I tried connecting from my laptop with telnet again without the : and got the same results. On my Linux box both firewalld and ufw say nothing is active. My GUI Gufw also agrees no firewall is active. On my router, there is a firewall, but disabling that did not help either.
Do I need to set the ports for incoming traffic? Sorry, I know a bit about Linux on a PC (been using it for 20+ years) but I am totally new to WAN/LAN stuff.
User avatar
Nazar78
Posts: 2002
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Help using Backup & Restore Utility with Linux

Post by Nazar78 »

No problem. You got the same results? Connection refused or no route to host? Need to know the exact error. Please post some photos connecting telnet from your PC to the linux box.

You do not need incoming ports set on your router (NAT) as this is LAN based not WAN unless you want to access from outside your local network. Also no need to disable the firewall on the router that's usually for WAN on consumer routers.

Is your network setup as static or dhcp? Please also provide both your PC and linux box network details i.e. "ip addr show". You should mask (xxx.xxx.xxx.xxx) any public IP for privacy we just want to see your local subnet which should be the same for all devices connecting to the router.

Also for the sake of testing, please run the same telnet commands for port 21 and 873 on your linux box. You can swap its ip to local 127.0.0.1. You can check if the ftp and rsync is running on those ports "netstat -natp|grep -E ':(21|873) '".
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
dmtparker
Posts: 27
Joined: Wed Aug 04, 2021 10:56 pm

Re: Help using Backup & Restore Utility with Linux

Post by dmtparker »

Please see comments below
Nazar78 wrote:No problem. You got the same results? Connection refused or no route to host? Need to know the exact error. Please post some photos connecting telnet from your PC to the linux box.
I will try to get screen shot from laptop and post, but the message is "Unable to connect to remote host: Connection refused"

You do not need incoming ports set on your router (NAT) as this is LAN based not WAN unless you want to access from outside your local network. Also no need to disable the firewall on the router that's usually for WAN on consumer routers.
OK

Is your network setup as static or dhcp? Please also provide both your PC and linux box network details i.e. "ip addr show". You should mask (xxx.xxx.xxx.xxx) any public IP for privacy we just want to see your local subnet which should be the same for all devices connecting to the router.
It was dhcp, but I changed the box to static thinking that might be part of the problem. See attached screenshot

Also for the sake of testing, please run the same telnet commands for port 21 and 873 on your linux box. You can swap its ip to local 127.0.0.1. You can check if the ftp and rsync is running on those ports "netstat -natp|grep -E ':(21|873) '"
No results.
Attached file shows all of terminal output for above.
Attachments
Screenshot-2.png
Screenshot-2.png (112.89 KiB) Viewed 4235 times
User avatar
Nazar78
Posts: 2002
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Help using Backup & Restore Utility with Linux

Post by Nazar78 »

Your network seems to be correct judging from the subnet /24.

Your last command is incomplete:

Code: Select all

netstat -natp|grep -E ':(21|873) '
Seems you don't have any rsyncd or ftpd running on the linux box? So nothing to connect to. You need to install then configure them, try:

Code: Select all

sudo apt install rsync vsftpd
Then look on the web how to configure them, this part is lengthy but a quick search can have them setup in 5 mins. I suggest stick to ftp as rsync needs more config.

https://www.experiencingit.net/linux/in ... nc-daemon/

https://wiki.debian.org/vsftpd

We can actually do smb/cifs and even nfs backup to or from any linux box using the backup & restore utility but this requires bit of modification which I'll not cover it here.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
dmtparker
Posts: 27
Joined: Wed Aug 04, 2021 10:56 pm

Re: Help using Backup & Restore Utility with Linux

Post by dmtparker »

I'm confused. See comments below.
Nazar78 wrote:Your network seems to be correct judging from the subnet /24.

Your last command is incomplete:

Code: Select all

netstat -natp|grep -E ':(21|873) '
I ran the above (copy and paste so no typo) and got no results (just '>' which I eventually terminated with ^C)

Seems you don't have any rsyncd or ftpd running on the linux box? So nothing to connect to. You need to install then configure them, try:

Code: Select all

sudo apt install rsync vsftpd
This code worked and installed both (which would tend to confirm your thought that they were not installed, but I have used ftp to connect to the NAS - only thing that has worked - and luckyBackup uses rsync and it worked with previous NAS and at least connected to this one, it just kept giving the error message that it couldn't set the time?

Then look on the web how to configure them, this part is lengthy but a quick search can have them setup in 5 mins. I suggest stick to ftp as rsync needs more config.

https://www.experiencingit.net/linux/in ... nc-daemon/

https://wiki.debian.org/vsftpd

We can actually do smb/cifs and even nfs backup to or from any linux box using the backup & restore utility but this requires bit of modification which I'll not cover it here.
I am sure I can get both up and working over the next day or two, but I'm again confused as to which is server and which is client. I would think the NAS would be server and my linux box client as I am trying to back up the linux box onto the NAS, but it looks like setting up rsyncd is to make the box a server?? As I said, ftp (run on the linux box) connects to the NAS just fine and transfers files fine, it is just not an automated process.
dmtparker
Posts: 27
Joined: Wed Aug 04, 2021 10:56 pm

Re: Help using Backup & Restore Utility with Linux

Post by dmtparker »

Ok, I think I have both rsyncd and vsftpd up and running. I tried

Code: Select all

 rsync-rtn rsync://192.168.1.3
and got the listing of the two modules I had defined. When I tried to list the contents of the module, however, it failed as shown below. I am sure that relates to my defining who has access in the 'secrets' file. I put in my account and password and the root account and password, but how do I define the remote computer trying to log in? It didn't ask for a username, just a passsword
Screenshot_2021-08-06_18-11-41.png
Screenshot_2021-08-06_18-11-41.png (32.63 KiB) Viewed 4207 times
Also, how do I test vsftpd? And how does all this help me with the Backup Utility? What do I do next?
Thanks 10^6 for all the help.
Skip the testing vsftpd. I figured that out. It appears both are up and listening on the appropriate port. Now what do I do to use the Backup Utility?
Screenshot-3.png
Screenshot-3.png (103.42 KiB) Viewed 4207 times
Post Reply

Return to “Backup and Data Protection”