Nexus 3是否通过命令行备份? [英] Nexus 3 backup via command line?

查看:448
本文介绍了Nexus 3是否通过命令行备份?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Nexus 3中,备份过程已更改.

In Nexus 3 backup procedure has changed.

在Nexus 2中,建议运行OS计划的任务/cron作业以将某些目录同步到备份位置.

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

在Nexus 3中,推荐的方法似乎是创建用于安排预定义的Nexus任务导出配置&备份任务的元数据.然后还创建一个cron作业,以备份与此任务一起导出的内容.

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.

在Nexus 3中仍然可以进行旧式备份吗?关闭服务器并备份某些目录?然后要恢复,只需将所有内容放回原处?那行得通吗?

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?

在Nexus 3中完成此操作的方式似乎未得到很好的考虑.您需要做更多的工作才能完成Nexus 2中的单个cron作业可以完成的工作.

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. 创建计划任务以导出数据.
  2. 创建cron作业以备份导出的数据.
  3. 确保计划任务在cron作业之前运行并完成.

例如,参见 https://help.sonatype.com/display/NXRM3/还原+导出+数据库

另请参见 Nexus存储库3备份

推荐答案

如果备份整个数据(sonatype-work)目录,则该目录应该可以正常运行.但是,由于数据目录很大并且有许多活动部件,因此使用该任务会更安全,否则,您可能会得到运动中事物的副本,这些副本随后可能会损坏,并且备份将无法工作.据我所知,仅建议在停机的服务器上使用工作目录的副本,而对于许多较大的公司而言,则不是这样的选择.

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.

这篇关于Nexus 3是否通过命令行备份?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆