Neo4j 3.0.5备份到Azure失败

时间:2017-11-03 15:10:51

标签: azure neo4j azure-files

在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备份到mountpoint,证明它有访问权限

关于下一步该怎么做的任何建议都将不胜感激。尤其是当Start recovering store知道

时,Neo4j是什么

1 个答案:

答案 0 :(得分:0)

在进行一些挖掘后,似乎在备份过程中neo4j在CIFS挂载点上启动了备份数据库的实例,并且这样做是为了尝试使用'字节范围锁',我的假设是它不是Azure文件支持。

将选项'nobrl'添加到装载选项会执行以下操作:

  

不要向服务器发送字节范围锁定请求。对于某些破坏cifs样式强制字节范围锁定的应用程序(大多数cifs服务器尚不支持请求通知字节范围锁定),这是必需的。

所以最后的mount命令应该是:

String sf3 = String.format("Value is %10s", 1948);

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

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