mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 15:04:00 +01:00 
			
		
		
		
	Don't store repo archives on gitea dump (#35467)
				
					
				
			When running `gitea dump`, don't store the contents of `data/repo-archive` in the output. These archives can easily be regenerated from the repository data, and does not need to be backed up. Fixes #35450 --- <s>Added a `--skip-repo-archive` flag to the `gitea dump` command. Enabling this flag will exclude the contents of `data/repo-archive` from the dump. The implementation is similar to the other `--skip-*` flags that excludes directories from `data`.</s> Signed-off-by: h7x4 <h7x4@nani.wtf> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		
							parent
							
								
									84812e42df
								
							
						
					
					
						commit
						7a474d1c95
					
				@ -265,6 +265,7 @@ func runDump(ctx context.Context, cmd *cli.Command) error {
 | 
			
		||||
		excludes = append(excludes, setting.LFS.Storage.Path)
 | 
			
		||||
		excludes = append(excludes, setting.Attachment.Storage.Path)
 | 
			
		||||
		excludes = append(excludes, setting.Packages.Storage.Path)
 | 
			
		||||
		excludes = append(excludes, setting.RepoArchive.Storage.Path)
 | 
			
		||||
		excludes = append(excludes, setting.Log.RootPath)
 | 
			
		||||
		if err := dumper.AddRecursiveExclude("data", setting.AppDataPath, excludes); err != nil {
 | 
			
		||||
			fatal("Failed to include data directory: %v", err)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user