LuckyBX Русский
Sites

Moving a site from another server

luckybx site import shop.example.com --from root@old-server

Works with BitrixVM, normal hosting with SSH access and another server with LuckyBX. Nothing changes on the old server: files and the database are only read.

What happens#

  1. LuckyBX looks for the site on the old server. If it is not found, give the folder with the --path key.
  2. It checks whether there is enough space.
  3. It copies the files and the database.
  4. It switches the site to the new database, cache and push and removes the old server's settings.

Useful keys#

Check before switching the domain#

Put the new server's address in the hosts file on your computer and open the site. When everything is fine:

  1. Switch DNS to the new server.
  2. Issue a certificate.
  3. Turn off the site's cron on the old server so that letters and jobs do not run twice.

Moving from a ready copy#

If you already have a folder with the files and a database dump:

luckybx site import shop.example.com --from /root/copy --dump /root/db.sql.gz

nginx does not read .htaccess. If it has your own rules, the command reminds you of that. Then turn on Apache for the site.