8000 How to migrate everything properly between VPS-s? · Issue #330 · mjl-/mox · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

How to migrate everything properly between VPS-s? #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already o 8000 n GitHub? Sign in to your account

Closed
manaus0xff opened this issue Apr 7, 2025 · 2 comments
Closed

How to migrate everything properly between VPS-s? #330

manaus0xff opened this issue Apr 7, 2025 · 2 comments

Comments

@manaus0xff
Copy link

Let's say, I've decided to move to a VPS of other VPS provider. After having updated my DNS records accordingly, how would I properly

a) back up everything on server S1
b) restore it server S2
?
To then re-run it smoothly.

Meaning, which precisely files should be backed up for migration? And how to, properly?
And the same for restoration.

@mjl-
Copy link
Owner
mjl- commented Apr 11, 2025

Hi @manaus0xff!

You should copy the config/ and data/ directories from the old machine to the new machine, and start mox. If the new machine has a new hostname, you would have to update the Hostname in config/mox.conf. With a new hostname, you would also update some DNS records, for example the MX records. If you're using the mox.service (systemd unit file), you would copy that too.

By the way, the old and new machine both need to 32-bit or 64-bit. The database files (for the message indexes) can't be moved between 32-bit and 64-bit machines.

@manaus0xff
Copy link
Author
manaus0xff commented May 1, 2025

Alright.

What would be the correct way to set up the paths in this case?

On the 2nd machine, on Arch Linux, after installation from the AUR repo (yay -S mox), there have been created 2 empty directories:

  • /var/mox
  • /etc/mox

And a mox.service file. Here's a part of it:

[Unit]
# [.........]

[Service]
# [.........]
# Mox starts as root, but drops privileges after binding network addresses.
WorkingDirectory=/var/mox
ExecStart=/usr/bin/mox -config /etc/mox/mox.conf serve
ExecStop=/usr/bin/mox -config /etc/mox/mox.conf stop
User=mox

# [.........]
ReadWritePaths=/etc/mox/ /var/mox

mox the exe has been copied to /usr/bin too.

Although I could run mox from any directory, for instance ~/my_mox_custom_dir where I'd create 2 directories ./data and ./config, do I undertand correctly in the current setup I would have to:

  1. copy the content of my ./config directory (mox.conf, domains.conf, dkim/) from the 1st (old) machine to /etc/mox/

  2. copy my ./data directory from the 1st (old) machine to /var/mox

  3. correct the path in mox.config: DataDir: ../data ====> DataDir: /var/mox/data

  4. and finally run the mox.service

  5. Update DNS and hostname in the config

?

Must config/mox.conf and config/{domains.conf,dkim,adminpasswd} be placed in the same directory?

And I won't have to run mox quickstart?

6859

@manaus0xff manaus0xff reopened this May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0