HirbodBehnam / MTProtoProxyInstaller

One-click script to install MTProto Proxy server on CentOS, Ubuntu and Debian
MIT License
824 stars 166 forks source link

Backup Possibility #23

Closed A2116 closed 4 years ago

A2116 commented 4 years ago

I am running python server How can backup server and client settings and transfer it to another server? is it possible?

HirbodBehnam commented 4 years ago

Hello Yes. At first install the proxy on new server, (with my script) and then copy all /opt/mtprotoproxy to the new server and overwrite anything.

A2116 commented 4 years ago

I am using centos, is any problem occur if centos version will upgrade from 7.4 to 8.1

On Wed, Mar 18, 2020 at 5:51 PM Hirbod Behnam notifications@github.com wrote:

Closed #23 https://github.com/HirbodBehnam/MTProtoProxyInstaller/issues/23.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HirbodBehnam/MTProtoProxyInstaller/issues/23#event-3141671272, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ5HKJE32Z6IE64SKJGGKSTRIDKGDANCNFSM4LOSO4YQ .

HirbodBehnam commented 4 years ago

@A2116 This script might not work on Centos 8

A2116 commented 4 years ago

if I want to upgrade to the new script that supports random padding and I copy all /opt/mtprotoproxy to new server then is the new script will work? or I should only transfer certain files to the new server?

HirbodBehnam commented 4 years ago

Hello No I will not add backup support to script. You can manually copy the files as said. Also the script supports random padding you have to enable it when it's installing (as I said in your previous issue) Also it's a good idea to copy all of the files to new server.

A2116 commented 4 years ago

when I copy all files mtprotoproxy.py also will be copied and I think it's the main file is this lead to revert to the old version or not?

HirbodBehnam commented 4 years ago

Please note that if you are going to use newer scripts with older MTproto installs, you might brick the config file. So my best suggestion is to copy all of the files including the mtprotoproxy.py and script itself. Now two things:

  1. If you are going to upgrade the MTProtoProxy you can do it via script without any worries.
  2. If you are going to upgrade the script itself, completely uninstall the MTproto proxy (without backups) and install a fresh one later. I do not grantee that the newer scripts are compatible with the older ones.
A2116 commented 4 years ago

my main goal is to keep users and configs and upgrading server so only thing that I need user keys and user limitations

HirbodBehnam commented 4 years ago

As I said, It's a good idea to copy everything including the script.

A2116 commented 4 years ago

I copy all /opt/mtprotoproxy content to another place then I copy mtprotoproxy.service and MTProtoProxyInstall.sh to another place then I uninstall it using the script and remove MTProtoProxyInstall.sh file and download the new script using curl then I installed the new script using the same port and other configs and create a new user and add all limitation to it to reproduce config files by comparison of the new and old file, I recognized that the main structure does not change and so I copy config.py and limits_bash.txt and limits_date.json and limits_quota.json content to new files and restart the server everything works fine and all users can connect using their old configurations so I think migration process becomes completely successful