refactor(mikrotikBackupRoutes, mikrotikBackupScheduler): update backup export command to use /rest/execute with compact terse script for improved reliability
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m19s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m19s
This commit is contained in:
@@ -53,9 +53,8 @@ async function getServerIdsFromUiSettings(logger) {
|
||||
}
|
||||
|
||||
async function fetchRouterExport(client) {
|
||||
// Согласно официальной документации, /rest/export позволяет экспортировать конфиг.
|
||||
// Параметр "compact" без значения эквивалентен /export compact.
|
||||
const res = await client.command('export', { compact: '' });
|
||||
// Используем /rest/execute с командой "/export compact terse", чтобы гарантированно получить вывод в ответе.
|
||||
const res = await client.command('execute', { script: '/export compact terse' });
|
||||
const data = res && res.data;
|
||||
if (!data) return '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user