Discussion:
[BackupPC-devel] Status Result codes for direct restore
Henrik Genssen
2015-04-29 15:26:21 UTC
Permalink
Hi,

I am using backuppc 3.1.0.
If I download a single file from a backup directly I get the file downloaded in its binary form fine using the web-interface.

If I now write a script constructing the URLs for my missing files to download them from a backup, this works of course, too :-)
But if the file does not exist in the given backup, I get a HTTP Result code of 200 with a HTML Page telling me, that the file was not found. Does this make sense?
Is it just related to my old backuppc version?

regards

Henrik

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
BackupPC-devel mailing list
BackupPC-***@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
Alexander Moisseev
2015-04-29 16:15:15 UTC
Permalink
Post by Henrik Genssen
If I now write a script constructing the URLs for my missing files to download them from a backup, this works of course, too :-)
But if the file does not exist in the given backup, I get a HTTP Result code of 200 with a HTML Page telling me, that the file was not found. Does this make sense?
What result code are you expected?
You got 200 OK since you successfully got a web page.

--
Alexander
Henrik Genssen
2015-04-30 12:02:49 UTC
Permalink
I would expect a 404, as the content I requested was not found.
The content of the resulting HTML page is fine and any browser would show it up even on a 404 state.

regards,
Henrik
date: 29.04.2015 18:15:15
subject: Re: [BackupPC-devel] Status Result codes for direct restore
Post by Henrik Genssen
If I now write a script constructing the URLs for my missing files to download them from a backup, this works of course, too :-)
But if the file does not exist in the given backup, I get a HTTP Result code of 200 with a HTML Page telling me, that the file was not found. Does this make sense?
What result code are you expected?
You got 200 OK since you successfully got a web page.
--
Alexander
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
BackupPC-devel mailing list
List: https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
BackupPC-devel mailing list
BackupPC-***@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
Alexander Moisseev
2015-04-30 14:51:04 UTC
Permalink
Post by Henrik Genssen
I would expect a 404, as the content I requested was not found.
The content of the resulting HTML page is fine and any browser would show it up even on a 404 state.
Quick patch is here:
https://gist.github.com/moisseev/f27aaa9a771b3d66830e

The patch set 404 status code to HTTP header for all objects returned on error. It is not correct but it should work for your needs.
The diff was made against installed FreeBSD package backuppc-3.3.0_7. This part of 3.1.0 code shouldn't differ except line numbers.

--
Alexander

Continue reading on narkive:
Loading...