@@ -36,6 +36,9 @@ type VtbackupProcess struct {
36
36
MysqlPort int
37
37
Directory string
38
38
39
+ BackupStorageImplementation string
40
+ FileBackupStorageRoot string
41
+
39
42
Cell string
40
43
Keyspace string
41
44
Shard string
@@ -66,8 +69,8 @@ func (vtbackup *VtbackupProcess) Setup() (err error) {
66
69
"--init_shard" , vtbackup .Shard ,
67
70
68
71
//Backup Arguments are not optional
69
- "--backup_storage_implementation" , "file" ,
70
- "--file_backup_storage_root" , path . Join ( os . Getenv ( "VTDATAROOT" ), "tmp" , "backupstorage" ) ,
72
+ "--backup_storage_implementation" , vtbackup . BackupStorageImplementation ,
73
+ "--file_backup_storage_root" , vtbackup . FileBackupStorageRoot ,
71
74
)
72
75
73
76
if vtbackup .initialBackup {
@@ -129,16 +132,18 @@ func VtbackupProcessInstance(tabletUID int, mysqlPort int, newInitDBFile string,
129
132
cell string , hostname string , tmpDirectory string , topoPort int , initialBackup bool ) * VtbackupProcess {
130
133
base := VtProcessInstance ("vtbackup" , "vtbackup" , topoPort , hostname )
131
134
vtbackup := & VtbackupProcess {
132
- VtProcess : * base ,
133
- LogDir : tmpDirectory ,
134
- Directory : os .Getenv ("VTDATAROOT" ),
135
- TabletAlias : fmt .Sprintf ("%s-%010d" , cell , tabletUID ),
136
- initDBfile : newInitDBFile ,
137
- Keyspace : keyspace ,
138
- Shard : shard ,
139
- Cell : cell ,
140
- MysqlPort : mysqlPort ,
141
- initialBackup : initialBackup ,
135
+ VtProcess : * base ,
136
+ LogDir : tmpDirectory ,
137
+ Directory : os .Getenv ("VTDATAROOT" ),
138
+ BackupStorageImplementation : "file" ,
139
+ FileBackupStorageRoot : path .Join (os .Getenv ("VTDATAROOT" ), "/backups" ),
140
+ TabletAlias : fmt .Sprintf ("%s-%010d" , cell , tabletUID ),
141
+ initDBfile : newInitDBFile ,
142
+ Keyspace : keyspace ,
143
+ Shard : shard ,
144
+ Cell : cell ,
145
+ MysqlPort : mysqlPort ,
146
+ initialBackup : initialBackup ,
142
147
}
143
148
return vtbackup
144
149
}
0 commit comments