Open feixia5712 opened 2 years ago
4.x 版本已经支持。 参考一下这里:https://github.com/openspug/spug/issues/535
稳定版本目前还没推出来吧
可以使用mysql命令导出,调整下SQL就行。 --进入数据库 docker exec -it spug-db mysql -uroot -pspug.cc1 spug --设置字符集 set character_set_results=utf8; --查询组对应ID,取sort_id值 select from host_groups; --根据组sort_id,查询组内主机 select from hosts where id in (select host_id from host_groups_hosts where group_id=74 );
select * from hosts where id in (select host_id from host_groups_hosts where group_id=68 ); --导出数据 docker exec -it spug-db mysql -uroot -ppassword spug -e "SELECT hostname,port,name FROM hosts WHERE id IN (SELECT host_id FROM host_groups_hosts WHERE group_id IN (75, 76, 65));" > idc.txt
--备份数据 docker exec spug-db sh -c 'exec mysqldump spug -uroot -p"password"' > spug$(date +"%Y%m_%d")_spug_backup.sql
请问下最新版本支持导出所有主机列表了吗?