recent
أخبار ساخنة

نسخ يوزرات الهوتسبوت بالرصيد المتبقي // ميكروتك Copy the hotspot usernames with the remaining balance // Mikrotik

نسخ يوزرات الهوتسبوت بالرصيد المتبقي // ميكروتك

ذلك لنقل النسخة مثلا إلى روتر آخر أو ليقوم بعمل فورمات للروتر ومن ثم البرمجة من جديد وإعادة اليوزرات





نعلم جميعاً ان هناك طريقة لإستيراد يوزرات الهوتسبوت او اي اعدادات في الروتر عن طريق الأمر
export
كالتالي :

 /ip hotspot user export file=myhotspotusers; 

 في هذا الامر سيقوم بعمل نسخة لليوزرات الى ملف سكريبت بالإسم  myhotspotusers  ولكن عند استيراد هذه النسخة ستكون اليوزرات بوقت ورصيد جديد حيث ستعود اليوزرات كلها من جديد دون أي استخدام

فما هي الطريقة لكي نقوم بإستيراد اليوزرات بوقت متبقي ؟؟
هذا ما سنقدمه لكم الان عبر ثلاث خطوات.

الخطوة الأولى :

اولاً سنقوم بحذف اليوزرات المنتهية الاستخدام .. حسب الوقت وحسب رصيد التحميل 
وذلك لأننا لا نريد استرجاع اليوزرات المنتهية ولكن هذه الخطوة (اختيارية)
وذلك بإستخدام الرول التالي :

المنتهي حسب الوقت المحدد

 /ip hotspot user remove [find limit-uptime=$uptime]; 

المنتهي حسب رصيد التحميل المحدد في قائمة limit-bytes-total

 /ip hotspot user remove [find limit-bytes-total=($"bytes-in" + $"bytes-out")];
 

ملاحظة الرولات السابقة لن تجدوها في إي مكان وهي عمل خاص من ماكس أبجريد
فجميع المواقع تستخدم foreach للحذف وذلك عن طريق رول طويل ولكن الرولات السابقة مبتكرة وسهله جداً وبطريقة مختلفة


الخطوة الثانية :

بعد حذف اليوزرات المنتهية سنقوم بعمل رول يقوم بالتعديل في الوقت المحدد وايضا يقوم بالتعديل في التحميل المحدد
فمثلاً عندما نقوم بعمل يوزر بوقت محدد 3 ساعات و 400 ميجا فإننا سنقوم بوضع ذلك في limit-uptime
والرصيد في limit-bytes-total
كالتالي :


فإذا افترضنا ان هذا المستخدم قد قام بإستخدام من الوقت ساعة وقام بتحميل 150 ميجا

فإننا نريد من الرول أن يقوم بالتعديل على هذا اليوزر ليكون الوقت المحدد له هو ساعتين ومن التحميل 250 ميجا
ومن ثم نقوم بإستيراد نسخة لليوزرات الى ملف سكريبت كما في أول رول قمنا بوضعه أعلاه

والان مع الرول :

اذا كان التحديد فقط للوقت ولست محدد التحميل ستستخدم الرول التالي :


 :foreach i in=[/ip hotspot user find where uptime>0s and limit-uptime>0s] do={
:local upt [/ip hotspot user get $i uptime];
:local limitupt [/ip hotspot user get $i limit-uptime];
:local newlimitupt ($limitupt - $upt);
:if ( $upt != $limitupt ) do={
/ip hotspot user set $i limit-uptime=$newlimitupt;
} else={ /ip hotspot user set $i disabled=yes comment="end uptime"; }
} 

اذا كنت محدد التحميل فقط ولست محدد الوقت ستستخدم الرول التالي :



 :foreach i in=[/ip hotspot user find where bytes-out>0 and limit-bytes-total>0] do={
:local upload [/ip hotspot user get $i bytes-in];
:local download [/ip hotspot user get $i bytes-out];
:local limitdown [/ip hotspot user get $i limit-bytes-total];
:local updown ($upload + $download);
:local newlimitdown ($limitdown - $updown);
:if ( $updown != $limitdown ) do={
/ip hotspot user set $i limit-bytes-total=$newlimitdown;
} else={ /ip hotspot user set $i disabled=yes comment="end download"; }
} 


اذا كنت محدد الوقت والتحميل معاً ستستخدم الرول التالي :



 :foreach i in=[/ip hotspot user find where uptime>0s and limit-uptime>0s and limit-bytes-total>0] do={
:local upt [/ip hotspot user get $i uptime];
:local limitupt [/ip hotspot user get $i limit-uptime];
:local newlimitupt ($limitupt - $upt);
:local upload [/ip hotspot user get $i bytes-in];
:local download [/ip hotspot user get $i bytes-out];
:local limitdown [/ip hotspot user get $i limit-bytes-total];
:local updown ($upload + $download);
:local newlimitdown ($limitdown - $updown);
:if ( $updown != $limitdown && $upt != $limitupt ) do={
/ip hotspot user set $i limit-uptime=$newlimitupt limit-bytes-total=$newlimitdown;
} else={ /ip hotspot user set $i disabled=yes comment="end uptime and download"; } 

الخطوة الثالثة والأخيرة :

سنقوم بعمل ريست لعداد الاستخدام لليوزرات ثم عمل النسخة الاحتياطية الجاهزة بالوقت والتحميل المتبقي لليوزرات في الهوتسبوت

طريقة عمل ريست لعداد الاستخدام



رول عمل نسخة 

 /ip hotspot user export file=myhotspotusers; 
كما سنجد ملف سكريبت نصي بإسم myhotspotusers.rsc في قائمة file نقوم بنسخه
ثم يمكنك استرجاع النسخة إلى روتر آخر مثلاً او بعد عمل فورمات لنفس الروتر
وذلك بنسخ الملف الى file ثم استخدم الامر التالي في newterminal

 import file=myhotspotusers.rsc
 

تفادياً لأي مشاكل لسبب خطأ اثناء نسخ الرولات أو لأي خطأ قم بعمل نسخة احتياطية كاملة للاعدادات
وذلك من قائمة file ثم قم بالنقر على backup

-----------------------------------------

المصدر : ماكس بجريد // احمد العليمي

----------------- EN ----------------

This is to transfer the copy, for example to another router, or to format the router, and then reprogram it and return the user



We all know that there is a way to import hotspot usernames or any settings in the router via the command
export
As follows :

/ip hotspot user export file=myhotspotusers;

 In this matter, it will make a copy of the users to a script file with the name myhotspotusers, but when importing this copy, the users will be with a new time and balance, where all the posts will return again without any use

What is the way to import the jerseys with the remaining time??
This is what we will present to you now through three steps.

The first step :

First, we will delete the expired user accounts, according to the time and balance of the download
This is because we do not want to retrieve the expired users, but this step is (optional)
Using the following roller:


Expired on time


/ip hotspot user remove [find limit-uptime=$uptime];


Ended by the load balance specified in the limit-bytes-total list


/ip hotspot user remove [find limit-bytes-total=($"bytes-in" + $"bytes-out")];



The second step :


After deleting the finished users, we will make a roll that will be modified at the specified time and also will be modified in the specified download
For example, when we make a user with a specific time of 3 hours and 400 megabytes, we will put that in a limit-uptime
And the balance at limit-bytes-total
As follows :
If we assume that this user has used an hour and downloaded 150 MB

We want the roller to modify this user so that the time specified for it is two hours, and the download is 250 megabytes
And then we import a copy of the user files into a script file, as in the first roll we put above

And now with the roller:

If the selection is only for the time and you are not specific to the download, you will use the following roll:
 


:foreach i in=[/ip hotspot user find where uptime>0s and limit-uptime>0s] do={
:local upt [/ip hotspot user get $i uptime];
: local limitupt [/ip hotspot user get $i limit-uptime];
: local newlimitupt ($limitupt - $upt);
:if ( $upt != $limitupt ) do={
/ip hotspot user set $i limit-uptime=$newlimitupt;
} else={ /ip hotspot user set $i disabled=yes comment="end uptime"; }
}

If you are limited to downloading only and not limited in time, you will use the following roll:



:foreach i in=[/ip hotspot user find where bytes-out>0 and limit-bytes-total>0] do={
:local upload [/ip hotspot user get $i bytes-in];
: local download [/ip hotspot user get $i bytes-out];
: local limitdown [/ip hotspot user get $i limit-bytes-total];
: local updown ($upload + $download);
: local newlimitdown ($limitdown - $updown);
:if ( $updown != $limitdown ) do={
/ip hotspot user set $i limit-bytes-total=$newlimitdown;
} else={ /ip hotspot user set $i disabled=yes comment="end download"; }
}


If you specify the time and download together, you will use the following roll:



:foreach i in=[/ip hotspot user find where uptime>0s and limit-uptime>0s and limit-bytes-total>0] do={
:local upt [/ip hotspot user get $i uptime];
: local limitupt [/ip hotspot user get $i limit-uptime];
: local newlimitupt ($limitupt - $upt);
:local upload [/ip hotspot user get $i bytes-in];
: local download [/ip hotspot user get $i bytes-out];
: local limitdown [/ip hotspot user get $i limit-bytes-total];
: local updown ($upload + $download);
: local newlimitdown ($limitdown - $updown);
:if ( $updown != $limitdown && $upt != $limitupt ) do={
/ip hotspot user set $i limit-uptime=$newlimitupt limit-bytes-total=$newlimitdown;
} else={ /ip hotspot user set $i disabled=yes comment="end uptime and download"; }
}


The third and final step:

We will do a rest of the usage counter for the users, then make the ready-made backup in time and load the remaining users into the hotspot

How to do a rest of the use counter
Roll work copy

/ip hotspot user export file=myhotspotusers;

We will also find a script file called myhotspotusers.rsc in the file list that we copy
Then you can restore the copy to another router, for example, or after formatting the same router
By copying the file to file and then using the following command in newterminal

import file=myhotspotusers.rsc


In order to avoid any problems due to an error while copying the rolls or any error, make a full backup copy of the settings
From the file menu, then click on backup



***********

لينك صفحة الفيس بوك
لينك قناة التيليجرام قناة العالمية Technology لكل جديد في عالم البرامج المدفوعة مجانا
................
لأي استفسار حسابي الانستا
كلمات دلائيلية لا تهمك
العالمية Technology
العالمية ارقام امريكية
العالمية العاب
العالمية مهكرة
العالمية تهكير العاب
العالمبة باسل خابور
العالمية باسل الخابور
العالمية منذر العقيلي
العالمية منذر عقيلي
العالمية ابو رواد
العالمية ابو يزن
العالمية أبو يزن أبو رواد
محترفين سوريا العالمية
محترفين سوريا (العالمية)
العالمية Technology طريقك نحو عالم جديد
صفحة العالمية على الفيسبوك
قناة العالمية على التيليجرام
قناة العالمية على اليوتيوب
قناة محترفين سوريا، عالمية، العالمية،العالمية Technology 202‪2, ،
العالمية فيزا وهمية، العالمية حساب امريكي، العالمية تحويل المتجر العادي إلى امريكي دائم وشحن فيزا مجانية #سوريا #النمسا #العراق #الخليج #الكويت #لبنان #فلسطين #مصر #الاردن #عرب #العالمية_technology #محترفين_سوريا #العالمية_محترفين_سوريا #محترفين_سوريا_العالمية
#العالمية_ارقام_امريكية #ارقام_امريكية_العالمية
#syria #2022

google-playkhamsatmostaqltradent