@@ -129,6 +129,14 @@ It can be used for backup and capture Gitea server image to send to maintainer`,
129
129
Name : "skip-custom-dir" ,
130
130
Usage : "Skip custom directory" ,
131
131
},
132
+ cli.BoolFlag {
133
+ Name : "skip-lfs-data" ,
134
+ Usage : "Skip LFS data" ,
135
+ },
136
+ cli.BoolFlag {
137
+ Name : "skip-attachment-data" ,
138
+ Usage : "Skip attachment data" ,
139
+ },
132
140
cli.GenericFlag {
133
141
Name : "type" ,
134
142
Value : outputTypeEnum ,
@@ -214,7 +222,9 @@ func runDump(ctx *cli.Context) error {
214
222
fatal ("Failed to include repositories: %v" , err )
215
223
}
216
224
217
- if err := storage .LFS .IterateObjects (func (objPath string , object storage.Object ) error {
225
+ if ctx .IsSet ("skip-lfs-data" ) && ctx .Bool ("skip-lfs-data" ) {
226
+ log .Info ("Skip dumping LFS data" )
227
+ } else if err := storage .LFS .IterateObjects (func (objPath string , object storage.Object ) error {
218
228
info , err := object .Stat ()
219
229
if err != nil {
220
230
return err
@@ -313,7 +323,9 @@ func runDump(ctx *cli.Context) error {
313
323
}
314
324
}
315
325
316
- if err := storage .Attachments .IterateObjects (func (objPath string , object storage.Object ) error {
326
+ if ctx .IsSet ("skip-attachment-data" ) && ctx .Bool ("skip-attachment-data" ) {
327
+ log .Info ("Skip dumping attachment data" )
328
+ } else if err := storage .Attachments .IterateObjects (func (objPath string , object storage.Object ) error {
317
329
info , err := object .Stat ()
318
330
if err != nil {
319
331
return err
0 commit comments