0

在 Neo4j ent 3.0.5 上运行备份时,它会失败并显示以下内容:

2017-11-03 14:52:43.512+0000 INFO [o.n.c.s.StoreCopyClient] Done, copied 114 
files
2017-11-03 14:52:43.923+0000 INFO [o.n.b.BackupService] Start recovering 
store
command failed: Backup failed: Unexpected Exception

当我检查 /var/log/neo4j/debug.log 时,它似乎认为一切正常。

2017-11-03 14:52:07.423+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check 
Pointing triggered by full backup [2012424]:  Starting check pointing...
2017-11-03 14:52:07.423+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check 
Pointing triggered by full backup [2012424]:  Starting store flush...
2017-11-03 14:52:08.260+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check 
Pointing triggered by full backup [2012424]:  Store flush completed
2017-11-03 14:52:08.260+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check 
Pointing triggered by full backup [2012424]:  Starting appending check point 
entry into the tx log...
2017-11-03 14:52:08.303+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check 
Pointing triggered by full backup [2012424]:  Appending check point entry 
into the tx log completed
2017-11-03 14:52:08.303+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check 
Pointing triggered by full backup [2012424]:  Check pointing completed
2017-11-03 14:52:11.582+0000 INFO [o.n.b.BackupImpl] BackupServer:6362-6: 
Full backup finished.

我正在运行以下命令:

sudo mkdir -m +x -p /backuptoazure
sudo mount -t cifs //xxxx.file.core.windows.net/neo4jbackup /backuptoazure -o vers=3.0,username=xxxx,password=xxxx,dir_mode=0777,file_mode=0777,sec=ntlmssp
sudo neo4j-admin backup --backup-dir=/backuptoazure --name="graph.db-backup.$(date +%Y-%m-%d)"

/backuptoazure 是位于 Azure 文件上的挂载点

注意事项;

-当我执行备份命令时,文件被写入 Azure 到一个temp-copy文件中(即它具有访问权限),但文件在失败后被删除

- 如果我将备份命令运行到本地 FS (/tmp),它会毫无问题地完成

-我可以CP备份到安装点,证明它可以访问

任何关于下一步去哪里的建议将不胜感激。特别是什么是 Neo4j,如果Start recovering store知道会很有趣

4

1 回答 1

0

经过一番挖掘,似乎在备份过程中 Neo4j 在 CIFS 挂载点上启动了一个备份数据库的实例,并在这样做时尝试使用“字节范围锁”,我的假设是 Azure 不支持它文件。

将选项“nobrl”添加到挂载选项会执行以下操作:

不要向服务器发送字节范围锁定请求。这对于某些违反 cifs 样式强制字节范围锁的应用程序是必要的(并且大多数 cifs 服务器还不支持请求咨询字节范围锁)。

所以最终的挂载命令应该是:

sudo mount -t cifs //xxxx.file.core.windows.net/neo4jbackup /backuptoazure -o vers=3.0,username=xxxx,password=xxxx,dir_mode=0777,file_mode=0777,sec=ntlmssp,nobrl

这应该有效。虽然未明确列出,但有关 Azure 文件限制的更多信息,请参阅:

https://docs.microsoft.com/en-us/rest/api/storageservices/features-not-supported-by-the-azure-file-service

于 2017-11-06T14:37:56.880 回答