anyproto / any-sync-dockercompose

docker-compose for testing any-sync
MIT License
338 stars 43 forks source link

Any way to backup existing anytype docker container #71

Closed Onefabis closed 2 months ago

Onefabis commented 3 months ago

Have you read a contributing guide?

Clear and concise description of the problem

In case my HDD will die, I'll loose my data on the server, but I want to recover my generated container from 'make start' command at some point.

Suggested solution

Could you provide any info how could I backup the whole docker container or maybe some files from it, so I could replace them in the new HDD drive so my device, that has latest data could update it to the server with old Network ID, so I don't need to create new account for that purpose, but use the old one instead.

Alternative

No response

Additional context

No response

fb929 commented 3 months ago

You only need to back up the contents of the ./storage directory (or STORAGE_DIR if you changed the settings) in any convenient way. it is best to do this by stopping all services, something like this:

make stop
cp -rp ./storage /path/to/backup/directory
make start
Onefabis commented 2 months ago

@fb929 another question similar to this topic, is there any way to restore account in case my server device will change ID address: when it connected to another router or it changes network connection from LAN to Wifi?

fb929 commented 1 month ago

@fb929 another question similar to this topic, is there any way to restore account in case my server device will change ID address: when it connected to another router or it changes network connection from LAN to Wifi?

I don't quite understand what you mean by "device will change ID address." If you are simply changing the IP address for the server, everything should be fine. You just need to:

  1. set the new IP address in EXTERNAL_LISTEN_HOSTS (file .env.override).
  2. regenerate and restart the server using make restart.
  3. deliver the updated config ./etc/client.yml to all client devices.
Onefabis commented 1 month ago

@fb929 yeah, sorry, you're actually right, right now it works fine. Last time I've tried that it didn't work with updated client.yml, this time it work well. Perhaps, I did something wrong that time. Thanks again!