Descarga la copia de seguridad con `curl` o `wget`

I occasionally have need to download a backup from an instance where I can’t ssh. Pulling 2GB down over my home internet connection where speedtest.net claims I get almost 500Mbps down isn’t that painful, but pushing it back up a 20Mbps is.

I thought that I might be able to use curl and pass an API key to download the backup, but what it gets is a redirect in an HTML document, and trying that URL in curl ends in a “bad request.”

Is there some way to do this that I’m missing?

Yeah, sounds familiar. I made this a few years ago. Haven’t used it in a while though so I’m not sure if it still works without modifications.

4 Me gusta

Wow! My dreams (maybe) answered! Thanks, Michael. I guess I should have searched a bit harder.

2 Me gusta

Why not just SCP server to server?

It uses SSH, will allow transfers that don’t hit your local line, and is already present on every host.

2 Me gusta

There exist Discourse instances on the planet where I have admin access, but not SSH/SCP access. :wink:

4 Me gusta

Yo también tuve este problema al intentar extraer una copia de seguridad de una máquina que no era la mía (por lo que no tenía acceso SSH). Se complicó aún más porque uso Brevo como proveedor de correo electrónico y ellos modifican el enlace para redirigirlo a su propio servidor para el seguimiento.

Para los correos electrónicos de copia de seguridad, podría ser útil mostrar explícitamente la URL completa y el token en lugar de ocultarlo en el href, que puede ser sobrescrito por los proveedores de correo electrónico.

Aún necesitarás iniciar sesión; de lo contrario, el enlace tampoco funcionará.

1 me gusta

¿Hay alguna forma sencilla de iniciar sesión a través de la línea de comandos de una máquina remota antes de emitir el wget para descargar la copia de seguridad?

¿Probaste mi script en la segunda publicación?

1 me gusta