heximcz / routerboard-backup

Ultimate backup of yours mikrotik routerboards.
https://routerboard-backup.best-hosting.cz/
Other
43 stars 14 forks source link

Connection refused #9

Closed AGM7 closed 6 years ago

AGM7 commented 6 years ago

Hi! I have tested version 1.0.0 and I have [Http\Client\Exception\NetworkException] Error creating resource: [message] fopen(http://127.0.0.1/api/v4/proje cts?search=Mikrotikbackup): failed to open stream: Connection refused [file] /opt/routerboard-backup/vendor/guzzlehttp/guzzle/src/Handler/StreamH andler.php [line] 324

[GuzzleHttp\Exception\ConnectException] Error creating resource: [message] fopen(http://127.0.0.1/api/v4/proje cts?search=Mikrotikbackup): failed to open stream: Connection refused [file] /opt/routerboard-backup/vendor/guzzlehttp/guzzle/src/Handler/StreamH andler.php [line] 324

[RuntimeException] Error creating resource: [message] fopen(http://127.0.0.1/api/v4/proje cts?search=Mikrotikbackup): failed to open stream: Connection refused [file] /opt/routerboard-backup/vendor/guzzlehttp/guzzle/src/Handler/StreamH andler.php [line] 324

I try to backup to Gitlab(10.2.2) What is an error? Help me please

heximcz commented 6 years ago

Hi, please check your configuration file:

gitlab:
    # gitlab api url - like this: http://git.your-domain.com/api/v4/
    url: 'https://<your-domain>/api/v4/'
    ....
    token: <!!! Personal Access Tokens !!!>

Private Token support has been removed in GitLab 10.2, from this version please use Personal Access Tokens

AGM7 commented 6 years ago

Hi

I can backup to Gitlab now. But when I try to restore .backup I have this message

Couldn't restore configuration - not a proper backup file (6)

What is it?

I have found an information:

The restoration procedure assumes the cofiguration is restored on the same router, where the backup file was originally created, so it will create partially broken configuration if the hardware has been changed.

I try to restore .rsc and I can't too.

heximcz commented 6 years ago

Hi,

Here is official documentation: Backup and restore

AGM7 commented 6 years ago

Hi

Why has .backup file been saved in base64 ? Can .backup file be saved without base64 in Gitlab? If it's impossible how must I decode .backup file? Can you give me the link of online-decoder or the program? I try to decode with some online-decoders but I can't get a right .backup file.

heximcz commented 6 years ago

Hi, sorry but this is not possible save binary file to the Gitlab. Before save binary file is need code binary file to the base64 file.

Decode is very easy on linux:

base64 --decode ./rbackup.backup > ./rbackup.backup-org

For windows solution try google.

AGM7 commented 6 years ago

Thank you I try https://www.base64decode.org/ What should I choose? Utf-8 ?

heximcz commented 6 years ago

You can try it.

heximcz commented 6 years ago

But I can add extra functionality to the

routerboard-backup.php as rb:decode -f <file>
heximcz commented 6 years ago

Ok, try new version with base64 decode support v1.0.1 Command is:

rb:decode -f <path to the base64 file>