NEMS 1.3 - Getting 404 for NEMS Backup URL

Having issues? Post them here, and help other users.
Post Reply
panda2297
Junior Member
Posts: 19
Joined: Mon Mar 05, 2018 12:04 am

NEMS 1.3 - Getting 404 for NEMS Backup URL

Post by panda2297 »

Hey Robbie,

As I was reading through the documentation, I saw that you have a way of making the backups convenient with snapshots over URL. I was reading the documentation here:

https://docs.nemslinux.com/tips/backup_ ... omatically

According to the documentation, it says to use this URL: https://NEMSIP/backup/backup.nems

I tried the URL and I get a 404 like this:

Not Found

The requested URL /backup/backup.nems was not found on this server.
NEMS Linux Server at nems.local Port 443

Now what's interesting is that I can confirm that the URL is actually creating the snapshot if I access over Samba. The backup.nems file is there over the Samba path.  I can tell by the modified date. And what's more interesting is that according to the documentation, if I access over Samba, it should create a new backup snapshot. But no matter how much I try, the snapshot only updates over the URL (although it keeps giving the 404 not found error.) I can also say that I see the backup being created at /var/www/html/backup/snapshot/backup.nems

To me, it's more of a big deal for wget not working as I want to use wget for pulling the backup.nems. It sounds like there are two potential issues here 1) Can't access backup over URL 2) Snapshot not being created over Samba.

Please let me know if you need anything else from me.

Edit: I got some more findings here. If I try to access https://mynemsip/backup/snapshot/backup.nems, I get the backup file just fine. However, a new backup is not generated unless I access over https://mynemsip/backup/backup.nems. So in other words, I have to access https://mynemsip/backup/backup.nems (get 404 error) and then https://mynemsip/backup/snapshot/backup.nems to pull the backup. I'm thinking that is not the intended design.
Last edited by panda2297 on Thu Mar 29, 2018 12:40 pm, edited 1 time in total.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: NEMS 1.3 - Getting 404 for NEMS Backup URL

Post by Robbie Ferguson »

Sorry you're having trouble.

First of all, for those perusing the thread for help, it should be noted that it is clear to me that panda2297 understands that NEMSIP and mynemsip are to actually be replaced with the IP address of your NEMS server... or these days using nems.local works in most cases as well.

panda2297, let's dig in...

NOTHING you do initiates the backup refreshing. I think you're getting confused when downloading it, and then a moment later downloading it again and seeing it hasn't changed. Then, you click a 404 link and suddenly it's a new file so you think there is a connection. Good deductive reasoning, but alas, pay no attention to the man behind the curtain! The backup automatically generates on a schedule... every 5 minutes. So you're simply noticing the file doesn't change with every load, but then after 5 minutes, boom, it's a new file.

So let's look at the real problem here. 404.

The correct URL is https://nems.local/backup/backup.nems

If accessing it in a browser, it'll ask you for your NEMS username and password, which you must enter.

Upon entering it correctly, it'll redirect and give you the file download. Is this not what you are experiencing?

The wget command I provide on the page you linked to should work flawlessly, assuming you enter the correct NEMS username and password in the needed fields.

Let me know. The output of your terminal when running the wget command might help too (just *** out your password).

Cheers,
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
panda2297
Junior Member
Posts: 19
Joined: Mon Mar 05, 2018 12:04 am

RE: NEMS 1.3 - Getting 404 for NEMS Backup URL

Post by panda2297 »

Robbie,

Yes that's correct. As soon as I run to the URL, I get a 404 (after I log in - sorry I should mention that.) Wget fails as well. I think it might be a good idea to do another screencast to show you exactly what I am seeing. In regards to the refreshing behavior, it's definitely updating the modified date. At least what I am seeing. I will post a screencast soon to show you what I see.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: NEMS 1.3 - Getting 404 for NEMS Backup URL

Post by Robbie Ferguson »

Can't wait for the show  :)
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
panda2297
Junior Member
Posts: 19
Joined: Mon Mar 05, 2018 12:04 am

RE: NEMS 1.3 - Getting 404 for NEMS Backup URL

Post by panda2297 »

Here is the video: https://youtu.be/criHn4pMD0I.  I'm pretty sure at least just accessing the URL and getting the file is more of a documentation update. You might have to give it about 15 minutes to process. In regards to the permission denied error at the end, I had to use sudo to get permission. But when I did that, I got a 401 unauthorized error and this confirming my password is correct

WARNING: cannot verify nems.local's certificate, issued by '/CN=NEMS':
  Self-signed certificate encountered.
WARNING: no certificate subject alternative name matches
requested host name 'nems.local'.
HTTP request sent, awaiting response... 401 Unauthorized
Reusing existing connection to [nems.local]:443.
HTTP request sent, awaiting response... 401 Unauthorized

Username/Password Authentication Failed.
Last edited by panda2297 on Thu Mar 29, 2018 3:29 pm, edited 1 time in total.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: NEMS 1.3 - Getting 404 for NEMS Backup URL

Post by Robbie Ferguson »

Ohmigosh - I from quickly skimming the video (I'll watch it thoroughly tonight) it appears I forgot to update documentation when I moved backup.nems off the SD card!!! You're not crazy--I am!

I'll get a good look at it tonight and fix it for you...

Thanks!
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
panda2297
Junior Member
Posts: 19
Joined: Mon Mar 05, 2018 12:04 am

RE: NEMS 1.3 - Getting 404 for NEMS Backup URL

Post by panda2297 »

Hey Robbie,

Was just wondering if you found anything. I'm unable to use wget to pull the backup successfully with my pi backup server.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: NEMS 1.3 - Getting 404 for NEMS Backup URL

Post by Robbie Ferguson »

Hi panda2297 - sorry, I actually got caught up between Easter festivities and having 2 sick kids and a sick wife at home (came down with a debilitating cold).

I'll get back on track this week and issue a patch. Thanks for checking in!!
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: NEMS 1.3 - Getting 404 for NEMS Backup URL

Post by Robbie Ferguson »

Fixed! Thanks again for pointing this out.

Now, in your wget command, you're showing an error "/backup/backup.nems - No such file or directory". Remember, the -O command in wget is saying OUTPUT to this folder. But /backup doesn't exist on your system. You need to change -O /backup/backup.nems to /wherever/you/want/it/backup.nems. Sorry that's not clear. I've improved the documentation and I appreciate your feedback (it helps me read things the way an end-user reads them). The reason you're getting the "permission denied" is not your NEMS server, but your Mac. Your Mac is saying "You're not allowed to save to /backup.nems" and "/backup/backup.nems doesn't exist"...
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
Post Reply