Skip to content

restore peers #35

@muplagama

Description

@muplagama

hey... I backup the peers by ready api and stored into a file. he shows:

analpflaster:~/vpn/backup# cat interfaces/peers_150.json
[
{
"public_key": "HiCUb0B3yDHIl+0uI+2QhtOaWnLO3ld1CI3xINDcZEc=",
"url_safe_public_key": "HiCUb0B3yDHIl-0uI-2QhtOaWnLO3ld1CI3xINDcZEc=",
"allowed_ips": [
"172.1.4.1/32"
],
"last_handshake_time": "0001-01-01T00:00:00Z",
"persistent_keepalive_interval": "25s",
"endpoint": "146.60.226.118:64096",
"receive_bytes": 0,
"transmit_bytes": 3996
}
{
"public_key": "5zaLcXXvX1zRD25jjwv0rNCcKqu6QocYuul5vUjkhFk=",
"url_safe_public_key": "5zaLcXXvX1zRD25jjwv0rNCcKqu6QocYuul5vUjkhFk=",
"allowed_ips": [
"172.1.4.2/32"
],
"last_handshake_time": "0001-01-01T00:00:00Z",
"persistent_keepalive_interval": "25s",
"endpoint": "",
"receive_bytes": 0,
"transmit_bytes": 0
}
]

if I will restore it by using this json file I got an error:

{"message":"Syntax error: offset=350, error=invalid character '{' after array element"}

I used for restore:
curl -iv POST -H 'Content-Type: application/json' -H "Authorization: Bearer $_key" -d @interfaces/peers_150.json $_api/$_interface1/peers/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions