Nexus 3 backup via command line?

╄→尐↘猪︶ㄣ 提交于 2020-04-04 18:32:11

问题


In Nexus 3 backup procedure has changed.

In Nexus 2 recommended was to run a OS scheduled task / cron job to rsync some directories to a backup location.

In Nexus 3 the recommended way seems to be to create to schedule a predefined Nexus Task Export configuration & metadata for backup Task. And then also create a cron job to backup what gets exported with this task.

Is it still possible in Nexus 3 to do a old style backup? Shutdown the server and backup certain directories? And then for restore just put everything back? Will that work?

Or use a command line to run this task?

The way this is done in Nexus 3 does not seem to be thought through very well. You need to do a lot more to do what could be done with a single cron job in Nexus 2:

  1. Create a scheduled task to export data.
  2. Create a cron job to backup exported data.
  3. Make sure that scheduled task runs and finished before the cron job.

See for example https://help.sonatype.com/display/NXRM3/Restore+Exported+Databases

See also Nexus Repository 3 backup


回答1:


If you back up the entire data (sonatype-work) directory this should work as you wish. However, since the data directory is large and has many moving parts, it is safer to use the task, otherwise you may get copies of things in motion which could then corrupt and your backup would not work. The copy of the work directory as far as I know is only recommended for servers that are down, which isn't an option for many bigger companies.




回答2:


Copying the entire folder did not work for me and resulted in orientdb problems. Last year I started to create N3DR. Version 3.5.0 has just been released.



来源:https://stackoverflow.com/questions/49272210/nexus-3-backup-via-command-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!