spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.88k stars 1.04k forks source link

systemctl disable --now matrix* fails (from migration guide) #1986

Open jakecoppinger opened 2 years ago

jakecoppinger commented 2 years ago

Following https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/maintenance-migrating.md and running systemctl disable --now matrix* on my server fails with error message:

Glob pattern passed to enable, but globs are not supported for this.         
Invalid unit name "matrix*" escaped as "matrix\x2a".                         
Failed to disable unit: Unit file matrix\x2a.service does not exist.

Expected behavior Not an error message, services stopped.

Matrix Server:

BettyNutz commented 1 year ago

i also had this problem (on Debian 11). did you get it sorted?

i had success with this:

To list all services on Debian 11 with "matrix" in their name, you can use the following command as the root user or with sudo privileges:

systemctl list-units --type=service --all --no-pager | grep matrix

To stop all services on Debian 11 with "matrix" in their name, you can use the following command as the root user or with sudo privileges:

systemctl list-units --type=service --all --no-pager | grep matrix | awk '{print $1}' | xargs -r sudo systemctl stop

I then followed the guide ....using tar to migrate the /matrix directory between servers. (Note: im doing this on my client (3rd machine) not from the OLD server or the NEW server).

ssh root@matrixold "tar czpf - --preserve-permissions /matrix" | ssh root@matrixnew "tar xzpf - --preserve-permissions -C /"

Maybe this could be updated in the documentation