Moving a Site
This article explains how to move a site to another alwaysdata account.
To do this we will use the SSH access rather than FTP which requires bringing the files back locally and then transferring them to the destination account.
In our example, we will consider the following information:
- Original account name:
foo
- Destination account name:
bar
- Original database name:
foo_base
- Destination database name:
bar_base
- The site is located in directory
$HOME/www/
- We will use the default SSH users and databases, i.e. the ones created when the accounts are opened (e.g.
foo
for the foo account andbar
for the bar account).
1. Copying files
We will use the scp command after connecting in SSH mode to the destination account.
bar@ssh:~$ scp -r foo@ssh-foo.alwaysdata.net:/home/foo/www/* ~/www/
2. Importing the database
This step is only necessary if your site is connected to a database. You need to first create the database in the destination account.
MySQL:
bar@ssh:~$ mysqldump -u foo -p -h mysql-foo.alwaysdata.net foo_base > foo_base.sql bar@ssh:~$ mysql -h mysql-bar.alwaysdata.net -u bar -p bar_base < foo_base.sql bar@ssh:~$ rm foo_base.sql
PostgreSQL:
bar@ssh:~$ pg_dump -U foo -W -h postgresql-foo.alwaysdata.net foo_base > foo_base.sql bar@ssh:~$ psql -h postgresql-bar.alwaysdata.net -U bar -W -d bar_base < foo_base.sql bar@ssh:~$ rm foo_base.sql
Info
Change the configuration file for the previously copied site so that it points to the newly imported database.
3. Moving addresses
Info
Only the account owner can initiate a transfer.
Now what remains is to move the addresses that link the site and the automatically generated SSL certificate.
Go to the Web > Sites section in the original account,
Choose the Transfer to another account action,
Administration interface: move site - step 1 And follow the steps.
Administration interface: move site - step 2
WARNING: For websites using a command1, the transferred website MAY have its port changed.
Info
A .alwaysdata.net
address can not be transferred as it is linked to the account name.
Tip
To move it to another of their accounts, simply provide their own e-mail address.
Node.js, User program, Elixir and Deno types. ↩︎