Moving backup location when deploying under docker

I have been using urbackup with docker for a few years now. I am now planning to move the backup location to a bigger disk. I am aware of the migration using “migrate_storage_to” as documented in the manual. My question is does this instruction apply to a docker deploy?

My docker is deployed with:

volumes:

  • /path/to/database/folder:/var/urbackup
  • /path/to/backup/folder:/backups

It looks to me that I could just copy the current database and backup folders to a new location, and just change the docker bind mount to the new location. As far as the container is concerned nothing has changed (i.e. /var/urbackup and /backups are still where they should be). Am I correct in my assumption that this will work?

Thanks.

Yeah will work. Just make sure to preserve all symlinks as they are. Also replicating the hard-links can be pain.

Thank you. I did not realize until now that urbackup had all those links internally that needed to be copied over intact. Will either of the following rsync or tar commands accomplish the copy while maintaining symlinks and hard links? When you say “replicating hard-links can be pain,” did you mean additional tasks are involved? Thanks.

rsync -aH /src/ /dst/
or
tar -cpf - . | (cd /dst && tar -xpf -)