doc.rustdesk.com icon indicating copy to clipboard operation
doc.rustdesk.com copied to clipboard

Provided detailed commands to backup and upgrade Rustdesk

Open juanchomang opened this issue 9 months ago • 9 comments

I expanded on the commands to provide more detailed instructions on how to perform a backup of Rustdesk as well as bringing down the docker containers, removing the containers, removing the images, pruning any unused images, and finally pulling and bringing back up a fresh image of Rustdesk docker container.

juanchomang avatar May 31 '25 04:05 juanchomang

Coud you confirm if below better If docker compose up -d --build --pull always does not work for you?

docker compose down
docker compose pull 
docker compose up -d

Your commands work, but it is not a docker compose way. :(

rustdesk avatar May 31 '25 04:05 rustdesk

Sure, that works for upgrading but it does not clean up unused images.

juanchomang avatar May 31 '25 05:05 juanchomang

docker compose down
docker rmi rustdesk/rustdesk-server-pro  
docker image prune -f 
docker compose pull 
docker compose up -d

Will work?

rustdesk avatar May 31 '25 05:05 rustdesk

Yes, that would work very well.

juanchomang avatar May 31 '25 05:05 juanchomang

Interesting, the pull does not overwrite old image? The old image is not removed? How does it look like with docker images?

rustdesk avatar May 31 '25 05:05 rustdesk

I will try at the next version upgrade as it is not possible to replicate the environment now that I have upgraded... I even tried to pull an older image but the tag doesn't match so it won't overwrite...

juanchomang avatar May 31 '25 05:05 juanchomang

I will try this:

docker compose down docker compose pull docker compose up -d

juanchomang avatar May 31 '25 05:05 juanchomang

Thanks, great.

rustdesk avatar May 31 '25 05:05 rustdesk

docker compose pull
docker compose up -d

This will reduce downtime. The first command pulls the new image; the second command switches to the new image and recreates the container without having to wait for the pull process (though both RustDesk OSS and Pro server images are small).

After Docker switches to the new image, the old one becomes a "dangling image" (unused). Users should remove it themselves if needed.

We should not suggest users run this command, as they may be unfamiliar with Docker and risk causing data loss. We shouldn't have to take this responsibility.

docker image prune -f

xlionjuan avatar Jun 20 '25 12:06 xlionjuan