我正在使用unison
(文件同步工具)在我的 linux 机器(客户端)和 linux ssh 服务器(主机)之间同步文件。它会很好地同步点文件(以 开头的配置文件.
),但它根本不会创建它们的备份。这是一个错误,还是我遗漏了一些明显的东西。我主要希望有人在我发送错误报告之前再次确认我没有做愚蠢的事情。下面是一个最小的unison
配置文件和重新创建错误的步骤。
### ~/.unison/Test.prf
### Roots of Syncronization
root = /home/username
root = ssh://root@<host-ip-here>//root/SyncDir
sshargs = -C -i /home/username/ssh-key
### Directories to be Synced
path = TestDir
### Backup Settings
backuplocation = central
backupdir = /root/BackupDir
backup = Name *
maxbackups = 9
backupprefix =
backupsuffix = .$VERSION
这是我在客户端机器上运行以演示该错误的内容:
~$ mkdir TestDir;
~$ touch TestDir/testfile TestDir/.dottestfile
~$ ssh -i ssh-key root@<host-ip-here> 'mkdir SyncDir BackupDir'
~$ unison Test
~$ ssh -i ssh-key root@<host-ip-here> 'ls -A SyncDir/TestDir'
.dottestfile
testfile
~$ echo "some changes" > TestDir/testfile
~$ echo "some changes" > TestDir/.dottestfile
~$ unison Test
~$ ssh -i ssh-key root@<host-ip-here> 'ls -A SyncDir/TestDir'
.dottestfile
testfile
~$ ssh -i ssh-key root@<host-ip-here> 'ls -A BackupDir/TestDir'
testfile