الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

كيف أنقل مجلد كامل بين سيرفرين عن طريقftp

بدأه mujtaba في 13 يناير 2009 · 6 رد · 967 مشاهدة · في نظام تشغيل Unix & Linux
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

لدي استفسار و اتمنى الحصول على المساعدة منكم اخواني

أرغب في نقل مجلدات كاملة بما فيها من مجلدات فرعية و ملفات من سيرفر إلى سيرفر آخر عن طريق الـ FTP

و المشكلة هي ان الأمر mput ينقل الملفات فقط و لا ينقل مجلد كامل بمحتوياته. و عند استعانتي ببرامج الـ FTP مثل Smart-FTP

فإنه ينقل المجلد خاليا و لا يتمكن من نقل الملفات الداخية و يعطيني رسالة تقول "not a plain file."

أرجو المساعدة و شكرا

#2

السلام عليكم

أمامك حلان

الأول أن تأرشف المجلد ثم ترسله

tar -cvf dir.tar dir/
put dir.tar

أو تستخدم scp .

scp -r source:/home/user/dir  detination:/home/user/remotedir

System Engineer

Red Hat Certified Engineer

Red Hat Certificate Number

805010381752078

#3

Hi

Thanks a lot for your help. The first code is working fine with me but the problem is that when I have a huge folder such as a directory containing a database files (more than 40GB), it is difficult to use tar command because it will require a large free space in memory.

However, the second code is more efficient but I faced a problem with it. It gives me this message:

scp -r source:/home/filen detination:/home/user/remotedir

?Invalid command

The Source file in Server A is : /home/file1

The destination will be in server B : /home/file1

Could you please tell how the code will be using the second code provided by you above.

Thanks in advance for your help.

#4

السلام عليكم

آسف لتأخري عليك في الرد

لم أتنبه لردك إلا منذ قليل

ظهور ?Invalid command

هذا لأن openssh قد لا يكون موجودا

نفذا الأمر التالي للتأكد

rpm -qf `which scp`

على العموم

نفذ الأمر التالي

scp -r  /home/dir_name  user_name@destination_ip:/home/

System Engineer

Red Hat Certified Engineer

Red Hat Certificate Number

805010381752078

#5

السلام عليكم اخوي و مشكور على الرد

نفس المشكلة موجودة و اهو يعطيني الرسالة

?Invalid command

و لما كتبت الكود اللي ارسلته لي طلعت لي هذه النتائج

هل الامر غير موجود عندي؟!!

>rpm -qf `which scp`

file which:: A file or directory in the path name does not exist.

file 0652-141: A file or directory in the path name does not exist.

file There: A file or directory in the path name does not exist.

file is: A file or directory in the path name does not exist.

file no: A file or directory in the path name does not exist.

file scp: A file or directory in the path name does not exist.

file in: A file or directory in the path name does not exist.

file /pap/oracle/prodora/iAS_NEW/Apache/perl/bin is not owned by any package

file /pap/oracle/prodora/8.0.6_NEW/bin is not owned by any package

file /pap/oracle/prodappl//fnd/11.5.0/bin is not owned by any package

file /pap/oracle/prodappl//ad/11.5.0/bin is not owned by any package

file /pap/oracle/prodcomn/util/jre/1.1.8/bin is not owned by any package

file /pap/oracle/prodcomn/util/unzip/unzip is not owned by any package

file . is not owned by any package

file /usr/local/bin is not owned by any package

file /usr/jre/bin is not owned by any package

file /usr/java130/bin is not owned by any package

file /usr/java130/jre/bin is not owned by any package

file /usr/bin is not owned by any package

file /etc is not owned by any package

file /usr/sbin is not owned by any package

file /usr/ucb is not owned by any package

file /usr/bin/X11 is not owned by any package

file /sbin is not owned by any package

file /usr/local/bin is not owned by any package

file . is not owned by any package

file /usr/vacpp/bin.: A file or directory in the path name does not exist.

#6

لو كان نظامك rpm based

نفذ الأمر التالي:

yum install openssh*

ولو كان deb based

نفذ الأمر التالي:

apt-get install openssh*

ثم نفذ الأمر

scp -r  /home/dir_name  user_name@destination_ip:/home/

System Engineer

Red Hat Certified Engineer

Red Hat Certificate Number

805010381752078

#7

شكرا جزيلا اخي برق على مساعدتك

^_^

مواضيع مشابهة