How to resume repo sync

2019-01-26 15:18发布

Can anyone please mention how to resume the sync command?

I followed the following steps: $ repo init -u git://git.omapzoom.org/platform/omapmanifest.git -b eclair $ repo sync

The sync took more than 6 hours and I had to terminate the sync myself due to shortgae of bandwidth. Is there any way I can resume the sync from the previous session? I can see that the following folders are created:

bionic.git bootable build.git cts.git and many more....

I have access to free bandwidth only for 6 hours in a day, and I have to do the sync within this time. Any help is really appreciated.

4条回答
ら.Afraid
2楼-- · 2019-01-26 16:10

a "repo" consists of 176 "projects", some of them are very large (>100k of objects) you can only resume sync if some projects are fully downloaded, but others are not. but you cannot resume an interrupted sync of one big project. here's, a Git manual quote:

When cloning a large repository (such as KDE, Open Office, Linux kernel) there is currently no way to restart an interrupted clone. It may take considerable time for a user on the end of a small pipe to download the data, and if the clone is interrupted in the middle the user currently needs to start over from the beginning and try again. For some users this may make it impossible to clone a large repository.

So, if you really want to transfer these files to your machine - you'd better get access to some shell out of your network, transfer files there, and then sync your local PC and that remote shell with some restartable method, such as RSync.

Or even remotely compress all that things in one big archive, and download it to your machine with your favourite download manager.

查看更多
Viruses.
3楼-- · 2019-01-26 16:15

I was having the same issue so I created a script that does exactly what was said here before , download 1 project at a time until all are done.

No need for explanations you only have to do repo init and then run this script in the folder where the .repo was created.

It will download all projects and create a log telling the status of every project.

If an error occurred it will be logged.

If you run the script again it will read the log file and try to download first the "Error" projects.

Please take a look: http://shellswissknife.blogspot.com/2013/03/long-repo-sync.html

查看更多
混吃等死
4楼-- · 2019-01-26 16:16

One option for you is to do the sync one or two projects at a time.

repo sync Proj1 Proj2

This way you can control what is getting synced, and whether it is fully done. To get a full list of your projects, browse through the .git directory and manually do a repo sync on each project.

查看更多
做个烂人
5楼-- · 2019-01-26 16:17

As mentioned above, repo is used to manage several smaller project (some of which are very large). But you won't have to redownload the projects you have already finished downloading. You will, however, have to restart the project you were in the middle of downloading.

Just type in:

repo sync

again, and it will check to see if there's any updates to the projects you've already downloaded, if so, download them, and then start from the next downloaded project. If a single project takes you more than your allotted time to download (sounds like it is 6 hours), you will need to find a faster/different connection to download it.

查看更多
登录 后发表回答