Migrate from Uberspace 7 to 8¶
Moving to U8 is a good opportunity to sort through what has collected on your Asteroid. You can leave old experiments behind and give the things you still use a new home. We'll walk through copying your data, setting up services, and switching your domains once everything works.
This Howto assumes you already have a U7 and a U8 Asteroid. Keep both running while you prepare the move. Read the platform changes first, and check the application notes below alongside your application's migration instructions.
Before you start¶
You need SSH access to both Asteroids, access to your domain's DNS settings, and enough space on U8 for your files, database exports, and restored databases. Plan a maintenance window for the final transfer so nobody changes data while you move it.
Our examples use two different accounts:
| U7: source | U8: destination | |
|---|---|---|
| Username | isabell |
isabell8 |
| Hostname | stardust.uberspace.de |
moondust.uberspace.de |
Replace these names, paths, and database names with your own. Output is
illustrative and sometimes shortened. A different username also means different
home paths, database names, and a different default .uber.space address.
Run the transfer commands on U8: they pull files directly from U7 over SSH. Check that you can log in from U8 to U7 with your U7 SSH password or a dedicated SSH key. Verify the host fingerprint against the dashboard when connecting for the first time. The SSH Howto explains the connection setup.
Take stock¶
Make a short list of what you use and where it lives:
| What | Look for |
|---|---|
| Applications | Code, uploads, configuration, secrets, and data outside the web directory |
| Databases | Names, versions, credentials, extensions, and database engines |
| Runtimes | PHP, Python, Node.js, or other versions and dependencies |
| Services | Supervisor configurations, workers, queues, and cronjobs |
| Web | Domains, DocumentRoots, backends, ports, and redirects |
Mailboxes, aliases, forwards, filters, and .qmail files |
|
| External connections | SMTP, webhooks, APIs, and remote storage |
These commands on U7 are a useful starting point:
[isabell@stardust ~]$ uberspace web backend list
/ apache (default)
[isabell@stardust ~]$ supervisorctl status
my-app RUNNING pid 12345, uptime 1:00:00
[isabell@stardust ~]$ crontab -l
*/5 * * * * /home/isabell/my-app/sync
Check the application and Supervisor configuration too. Some settings contain passwords, so keep your notes private.
Decide which directories to move and which to archive or leave behind. Check symlinks and scheduled jobs before calling something unused. Keep the U7 copy until you've confirmed that everything you need works on U8.
Copy your files¶
Move one application at a time. Don't copy the entire home directory over U8's:
files such as ~/.my.cnf and ~/.pgpass contain credentials for the new Asteroid.
Keep them, and update your application's configuration to use them.
For an application stored in ~/my-app, preview the transfer on U8:
[isabell8@moondust ~]$ rsync --archive --no-owner --no-group --itemize-changes --dry-run isabell@stardust.uberspace.de:my-app/ ~/my-app/
created directory /home/isabell8/my-app
>f+++++++++ package.json
>f+++++++++ package-lock.json
Check the paths, then run the same command without --dry-run to copy the files.
The trailing slash on my-app/ means “copy this directory's contents”. Archive
mode preserves permissions, timestamps, and symlinks; --no-owner --no-group
leaves ownership with your U8 account. Symlinks keep their targets, so copy data
outside this directory separately and adjust links containing the old username.
For a website, use the actual source directory and U8's
DocumentRoot, normally
/var/www/virtual/$USER/html/. For a website in U7's standard DocumentRoot,
preview the copy from U8:
[isabell8@moondust ~]$ rsync --archive --no-owner --no-group --itemize-changes --dry-run isabell@stardust.uberspace.de:/var/www/virtual/isabell/html/ /var/www/virtual/$USER/html/
>f+++++++++ index.html
cd+++++++++ assets/
>f+++++++++ assets/style.css
Use your U7 username in the source path; $USER in the destination expands
to your U8 username. Check the preview, then remove --dry-run to copy.
Existing files with the same names can be overwritten, so check the destination
before proceeding. If U7 uses a different DocumentRoot, adjust the source path.
Keep database exports, backups, and private configuration outside publicly accessible directories. Applications with their own HTTP server can stay in your home directory and use a web backend.
Check the copied files, permissions, and links; checksums can help confirm that file contents match. Don't transfer running database directories this way: use the exports below. This first copy lets you prepare and test U8; you'll repeat the transfer after stopping changes on U7.
Reinstall dependencies¶
U7 and U8 use different operating systems. Copy your code and lockfiles, then rebuild dependencies on U8:
- Node.js: reinstall packages
instead of copying
node_modules. For a project withpackage-lock.json, usenpm ciand run the project's build steps. - Python: create a new virtual environment and reinstall the project's dependencies.
- PHP: check the required version, extensions, and Composer dependencies.
- Other languages: rebuild native libraries or get binaries compatible with U8.
For example, in the copied Node.js project on U8:
[isabell8@moondust my-app]$ npm ci
added 42 packages, and audited 43 packages in 2s
Start with the same application version where possible. If an upgrade is necessary, try it on the U8 copy first. Keep outgoing mail, scheduled jobs, and other actions that affect your live setup disabled while testing.
Move your databases¶
Use database exports to move between hosts. Keep exports private and restore into a new database on U8. Adapt database names and credentials in your application afterwards, while keeping secrets it needs to read existing data.
MariaDB / MySQL¶
For a database using InnoDB tables, export on U7:
[isabell@stardust ~]$ mkdir -m 700 ~/migration-private
[isabell@stardust ~]$ umask 077
[isabell@stardust ~]$ mysqldump --single-transaction --quick --hex-blob --routines --events --triggers isabell_app > ~/migration-private/app-initial.sql && printf 'Export completed\n'
Export completed
--single-transaction gives you a consistent export of InnoDB tables. Avoid
schema changes during the export. For other table engines, stop writes or use
the locking procedure recommended for that engine. If the export fails, fix
the error and repeat it before continuing.
Create a private transfer directory on U8 and fetch the export directly:
[isabell8@moondust ~]$ mkdir -m 700 ~/migration-private
[isabell8@moondust ~]$ rsync --archive --no-owner --no-group --itemize-changes isabell@stardust.uberspace.de:migration-private/app-initial.sql ~/migration-private/
>f+++++++++ app-initial.sql
Create the database with the source's character set and collation. This example
uses utf8mb4 and utf8mb4_unicode_ci:
[isabell8@moondust ~]$ mariadb -e 'CREATE DATABASE isabell8_app CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci' && printf 'Destination database created\n'
Destination database created
[isabell8@moondust ~]$ mariadb isabell8_app < ~/migration-private/app-initial.sql && printf 'Import completed\n'
Import completed
Check the export for source-specific database names and DEFINER values if you
use views, triggers, or stored routines. Resolve import errors before using the
database. The MariaDB Manual
explains U8's credentials and database names.
PostgreSQL¶
U8 provides managed PostgreSQL. Export your U7 database with pg_dump rather
than copying its data directory. Use a client compatible with your source
server, and check that your application supports the destination version.
On U7, set the connection details for your existing PostgreSQL instance
(PGHOST, PGPORT, PGUSER, and a private password file). Create
~/migration-private with mode 0700 if you haven't already, then export:
[isabell@stardust ~]$ umask 077
[isabell@stardust ~]$ pg_dump --format=custom --file="$HOME/migration-private/app-initial.pgdump" isabell_app && printf 'Export completed\n'
Export completed
On U8, use its own connection settings and ~/.pgpass. Create the private
transfer directory if needed, copy the dump, and add a database:
[isabell8@moondust ~]$ rsync --archive --no-owner --no-group --itemize-changes isabell@stardust.uberspace.de:migration-private/app-initial.pgdump ~/migration-private/
>f+++++++++ app-initial.pgdump
[isabell8@moondust ~]$ uberspace tool postgresql database add isabell8_app
OK: Added PostgreSQL database 'isabell8_app' to your Asteroid
Check required extensions and any objects already present in the new database. If they conflict with the dump, adjust the restore selection; don't drop platform-provided extensions. For a dump without those conflicts:
[isabell8@moondust ~]$ pg_restore --exit-on-error --single-transaction --no-owner --no-acl --dbname=isabell8_app ~/migration-private/app-initial.pgdump && printf 'Import completed\n'
Import completed
--no-owner --no-acl leaves out old ownership and permissions. Recreate any
additional roles or grants your application needs. See the
PostgreSQL Manual for U8's
connection settings and available extensions.
SQLite and other stores¶
Use the database's backup procedure. For SQLite, use its backup facility or stop all writers before copying the database and handling its WAL/journal files. Copying only a live main database file can miss data. Include any separate object storage, search indexes, and queues your application relies on.
Set up services and scheduled jobs¶
U8 uses systemd instead of Supervisor. Carry over your application's command, working directory, environment, and restart settings. See the systemd Manual for the options.
For example, this U7 Supervisor configuration runs a Node.js application:
[program:my-app]
directory=/home/isabell/my-app
command=node server.js
environment=NODE_ENV="production",HOST="0.0.0.0",PORT="3000"
autostart=true
autorestart=true
stopsignal=TERM
stopwaitsecs=30
stopasgroup=true
killasgroup=true
Once the application and its data are ready, the corresponding command on U8 is:
[isabell8@moondust ~]$ uberspace service add my-app "node server.js" --workdir /home/isabell8/my-app --env NODE_ENV=production --env HOST=0.0.0.0 --env PORT=3000 --directive Restart=always --directive RestartSec=5 --directive KillSignal=SIGTERM --directive TimeoutStopSec=30 --directive KillMode=control-group
...
[isabell8@moondust ~]$ systemctl --user show my-app.service -p ActiveState -p UnitFileState
ActiveState=active
UnitFileState=enabled
This starts the service immediately and enables it for future starts. During testing, keep it connected to the test database and disable production actions such as sending notifications. Wait until the final transfer to start workers that can't run independently of the live setup.
--workdir replaces Supervisor's directory; --env sets the environment.
The remaining options restart the application after it exits and give it
30 seconds to stop before cleaning up its child processes. Keep passwords in
private configuration files rather than command-line arguments.
Check the service and its logs on U8. For an application with a /health
endpoint, example output looks like this:
[isabell8@moondust ~]$ curl --fail --silent --show-error http://127.0.0.1:3000/health
{"status":"ok"}
[isabell8@moondust ~]$ journalctl --user -u my-app.service -n 10 --no-pager
Nov 17 12:00:00 moondust systemd[1234]: Started my-app.service.
Nov 17 12:00:00 moondust node[5678]: Listening on 0.0.0.0:3000
Set up its web backend and try it
through a test hostname too. Applications must listen on 0.0.0.0 or :: to
be reachable through the backend.
Recreate cronjobs or use systemd timers. Check paths, environment variables, and timezones. Keep the destination's scheduled jobs disabled until their U7 counterparts have stopped.
Prepare mail¶
Follow Migrate mail addresses to create U8 mailboxes,
copy messages over IMAP, and switch delivery. Copying ~/Maildir or ~/users
doesn't populate U8's managed mailboxes. Include messages from your old system
mailbox if you want to keep them.
For .qmail configuration, run the checker on U7:
[isabell@stardust ~]$ uberspace migration qmail check --assist
...
.qmail-postmaster
error: The file contains a username that is not the current user
...
Use the qmail migration reports to work through the findings. Recreate aliases, forwards, and filters on U8; custom command pipes need their own replacement. The checker doesn't move mail.
Update application SMTP settings too, so sending no longer depends on U7. See mail access and Sieve filters.
Try the U8 copy¶
Use a test hostname or local name resolution to try U8 before changing public DNS. Check the things you actually use:
- Log in, open existing content, and try uploads and downloads.
- Check database-backed features and any external integrations.
- Test redirects, application URLs, and each domain's DocumentRoot or backend.
- Start and stop services, inspect their logs, and try scheduled jobs with test data.
- Send and receive mail using an external mailbox you control.
Also check that private configuration and backups aren't reachable through the web server. The DocumentRoot Manual explains directory mappings and permissions.
Keep notes on anything that still needs fixing. It's much easier to do that while your U7 installation is still serving visitors.
Transfer the final changes¶
When the U8 copy works, start your maintenance window. Save the current DNS settings. If you lower TTLs beforehand, allow the previous TTL to expire before switching.
- Put the U7 application into maintenance mode or otherwise stop writes. Stop workers, cronjobs, and external integrations that change its data, then let active requests finish.
- Stop the corresponding U8 processes while refreshing their data.
- Repeat the file transfer and database exports. Files and databases now describe the same point in time. Keep the earlier backup and use new names for the final exports.
- Account for files deleted since the first copy, too. A plain rsync transfer
doesn't remove them on U8. Review deletions before applying them; don't add
--deleteblindly, especially where you've changed U8 configuration. - Restore the final exports into fresh databases, update the application to use them, reapply U8-specific settings, and check the result.
For a Supervisor service, stop it on U7 like this:
[isabell@stardust ~]$ supervisorctl stop my-app
my-app: stopped
Disable its autostart setting and apply the Supervisor configuration change so it doesn't restart unexpectedly. Leave the source's scheduled jobs stopped too. Incoming mail is handled separately: the mail Howto explains the follow-up sync for messages that arrive at the old host during the switch.
Switch your domains¶
Add your web domains and backends on U8 before switching DNS. Use the addresses shown for your destination, for example on U8:
[isabell8@moondust ~]$ uberspace web domain show app.example
Domain: app.example
Use the following values for your DNS:
$ORIGIN app.example.
@ IN A 192.0.2.20
@ IN AAAA 2001:db8:2::20
These IPs are examples. Update both A and AAAA with the values from your Asteroid, and account for any proxy or CDN you use. Switch mail records as described in the mail Howto.
Try the application under its final HTTPS address, including its certificate, login, and an existing file. Then enable writes, workers, and scheduled jobs on U8. Some visitors may still reach U7 while DNS caches expire, so keep writes blocked there.
Watch the new application's logs and check that its normal jobs run. For mail,
test delivery from outside Uberspace and repeat the sync for late arrivals on
U7. Keep both Asteroids until you're satisfied that nothing still depends on
the old one, including old .uber.space links.
Going back after the switch
Once U8 has accepted new data, switching DNS back to U7 would leave that data behind. Stop changes first and work out how to transfer new uploads, database changes, and mail back. Depending on what changed, fixing the U8 installation may be simpler than moving back.
Application notes¶
Restore your existing application rather than running a fresh-install wizard. The Lab's installation Guides help with U8's runtime and service settings; the application's own migration instructions cover its data.
WordPress
Copy the installation and database, including wp-content, wp-config.php,
and .htaccess. Keep the table prefix and authentication salts, and update
U8's database credentials. Check PHP compatibility for your plugins and themes.
The WordPress Guide covers the destination setup.
Keep the public URL if it isn't changing. If it does change, use WP-CLI search-replace to handle serialized data. Preview a change on a single-site U8 copy:
[isabell8@moondust html]$ wp search-replace 'https://old.example' 'https://app.example' --all-tables-with-prefix --skip-columns=guid --dry-run
...
Success: 42 replacements to be made.
Review the result and back up the destination database before removing
--dry-run. Multisite needs additional steps; see the
WordPress migration documentation.
Nextcloud
Move the database, application and custom apps, config/config.php, and the
complete data directory. Keep the instance secrets and encryption keys. Copying
visible user files alone loses information such as shares and file metadata.
Use the Nextcloud Guide for U8 settings and follow
Nextcloud's migration instructions
for your installed version.
For the final transfer, enable maintenance mode in the U7 installation:
[isabell@stardust html]$ php occ maintenance:mode --on
Maintenance mode enabled
Stop background jobs and let active requests finish before copying the database and files. Keep U8 in maintenance mode until you're ready to switch.
Different username, different data path
Nextcloud stores references to its data directory. If your U8 username
changes the path, changing datadirectory in config.php alone isn't
enough. Follow Nextcloud's guidance for your version and test the move
before switching your domain.
Hugo
Keep the source project, themes, and build configuration as well as the generated site. Match the Hugo version initially and update the deployment destination. If you build locally or in CI, you can keep doing that. See the Hugo Guide.
Joomla
Move the installation, uploaded media, extensions, and database together. Keep the site secret; update database credentials and log/temporary paths in configuration.php. See Joomla's backup instructions.
DokuWiki
Copy conf, data, plugins, and templates, including revisions and access rules. Preserve the protection files such as data/.htaccess and check that private files aren't publicly accessible. See DokuWiki's server-move instructions.
Mailman
Move Mailman Core, its web interface, databases, archives, configuration, and queues together. A member list alone isn't a complete backup. Compare the U7 and U8 Guides: their database setups may differ. Changing database engines needs a separate conversion, not just a dump import. Test archive privacy, moderation, subscriptions, and delivery, and make sure only one installation sends mail when you switch.