قم بتنزيل النسخة الاحتياطية باستخدام `curl` أو `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 إعجابات

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

إعجابَين (2)

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)

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

4 إعجابات

واجهت هذه المشكلة أيضًا للتو أثناء محاولة سحب نسخة احتياطية من جهاز لم يكن جهازي (لذلك لا يوجد وصول SSH). وقد زادت الأمور تعقيدًا حيث أنني أستخدم Brevo كمزود للبريد الإلكتروني وهم يتلاعبون بالرابط لإعادة توجيهه إلى خادمهم الخاص للتتبع.

بالنسبة للبريد الإلكتروني للنسخ الاحتياطي، قد يكون من المفيد عرض عنوان URL الكامل والرمز المميز بشكل صريح بدلاً من إخفائه في الرابط a href والذي يمكن أن يتم الكتابة فوقه بواسطة مزودي البريد الإلكتروني.

ستظل بحاجة إلى تسجيل الدخول وإلا فلن يعمل الرابط أيضًا.

إعجاب واحد (1)

هل هناك طريقة بسيطة لتسجيل الدخول عبر سطر الأوامر لجهاز بعيد قبل إصدار أمر wget لتنزيل النسخة الاحتياطية؟

هل جربت النص البرمجي الخاص بي في المنشور الثاني؟

إعجاب واحد (1)