Implement --backup-dir - fixes #98
The parameter of backup-dir specifies a remote that all deleted or overwritten files will be copied to.
This commit is contained in:
@@ -86,6 +86,7 @@ var (
|
||||
ignoreSize = BoolP("ignore-size", "", false, "Ignore size when skipping use mod-time or checksum.")
|
||||
noTraverse = BoolP("no-traverse", "", false, "Don't traverse destination file system on copy.")
|
||||
noUpdateModTime = BoolP("no-update-modtime", "", false, "Don't update destination mod-time if files identical.")
|
||||
backupDir = StringP("backup-dir", "", "", "Make backups into hierarchy based in DIR.")
|
||||
bwLimit BwTimetable
|
||||
|
||||
// Key to use for password en/decryption.
|
||||
@@ -209,6 +210,7 @@ type ConfigInfo struct {
|
||||
NoTraverse bool
|
||||
NoUpdateModTime bool
|
||||
DataRateUnit string
|
||||
BackupDir string
|
||||
}
|
||||
|
||||
// Find the config directory
|
||||
@@ -260,6 +262,7 @@ func LoadConfig() {
|
||||
Config.IgnoreSize = *ignoreSize
|
||||
Config.NoTraverse = *noTraverse
|
||||
Config.NoUpdateModTime = *noUpdateModTime
|
||||
Config.BackupDir = *backupDir
|
||||
|
||||
ConfigPath = *configFile
|
||||
|
||||
|
||||
Reference in New Issue
Block a user