Documentation / Mirroring a Repository Locally Using rsync from Depot
Mirroring a Repository Locally Using rsync from Depot
Some repositories in Depot can be synced locally using rsync
command. Bellow are instructions how to do that.
Rsync Command
To mirror a repository locally using rsync, execute the following command specifying the Depot rsync link and the target local directory. Use the -a
flag to recursively copy files, preserving attributes like permissions and timestamps. You can also add the --delete
flag to remove files in the local directory that are no longer present in the source repository, ensuring a complete mirror.
rsync -a [depot_rsync_link] [local_mirror_directory]
Optional Flags:
-a
: Archive mode, which recursively copies files and preserves attributes.
--delete
: Removes files in the destination directory that aren’t in the source repository, ensuring an exact mirror.
How to Find Depot rsync Link?
- After selecting the repository you want to mirror, navigate to ‘My Products’ and click on the product that contains the repository.
- In the product view, you’ll see a list of available repositories. Click the “…” to view the repository menu on the right side of the repository name. You should see the option ‘Rsync URI’.
- Right-click on the ‘Rsync URI’ menu item and choose “Copy Linked Address.”
- Now the rsync link is ready to be pasted into the rsync command.
What if the Repository Doesn’t Have the Rsync URI Option?
If the repository you want to mirror doesn’t have the ‘Rsync URI’ option in the menu, this repository is not enabled for rsync. In this case, you may need to explore other methods for mirroring, or contact the repository owner for alternative solutions.