On 25/05/06 12:44PM, Abhishek Dalmia wrote: > Hi Justin > > (My previous email got blocked due to HTML content) > > Thanks for the recommendation. We want to backup all the repo contents, so could you please comment if the following steps will help us backup and restore everything, or we might miss some tags/references? > > During backup: > - Create full bundle first time using: git bundle create <full-bundle-file-path> --all > - Create further incremental bundles using: git bundle create <inc-bundle-file-path> --since="<last-backup-time>" -all > - making sure we don't miss out any time Just something to note, it's ok if a bundle contains objects that already exist in the repository. So some overlap with the previous backup would be fine. > During restore: > - Create the initial repo with: git clone -bare <full-bundle-file-path> - using the full bundle we created earlier > - For restoring further incremental bundle files > - git fetch <inc-bundle-file-path> 'refs/*:refs/*' > - I can't use --all here, that works only with remote repos This seems reasonable to me. It may be worth validating that the bundles would apply to a fresh repository. If an incremental bundle depends on some prerequistite objects that are not in a repository it cannot be applied. This means if you have a series of incremental backups, they all would depend on each other and one missing in the middle could prevent subsequent bundles from being applied. > Will using 'refs/*:refs/*' restore everything, or is it possible any git data might get missed out? That refspec captures all references and mirrors them. All branches and tags, along with all reachable objects from them, would be fetched. -Justin