Skip to content
-
Subscribe to our newsletter & never miss our best posts. Subscribe Now!
Lê Vũ Blog
Lê Vũ Blog
  • Trang Chủ
  • Kiến Thức
  • Phần Mềm
  • Du Lịch
  • Mua Sắm
  • Sức Khỏe
  • Ẩm Thực
  • Trang Chủ
  • Kiến Thức
  • Phần Mềm
  • Du Lịch
  • Mua Sắm
  • Sức Khỏe
  • Ẩm Thực
Close

Search

  • https://www.facebook.com/
  • https://twitter.com/
  • https://t.me/
  • https://www.instagram.com/
  • https://youtube.com/
Subscribe
Kiến ThứcOpenstack

A quick and dirty script to backup Openstack config files

By vuat8b
April 11, 2023 1 Min Read
0

You will of course need to run ssh-copy-id root@hostname for each machine you want to connect to prior to running this script.

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
# declare an array called array and define 3 vales
osdirs=( "/etc/nova" "/etc/neutron" "/etc/cinder" "/etc/glance" "/etc/keystone" "/etc/httpd" )
servers=("vm-os-ks01" "vm-os-glance01" "vm-os-dash01" "vm-os-net01" "vm-os-net02" "vm-os-cinder01" "vm-os-radosgw01" )
 
for s in "${servers[@]}"
do
     for d in "${osdirs[@]}"
     do
         echo "Server $s Dir $d"
         scp -r root@$s:$d /root/backups/$s/$d
     done
done

 

Tags:

backup configbackup openstackOpenstack
Author

vuat8b

Follow Me
Other Articles
Previous

Monitor Switch, Router cisco với Prometheus và Grafana

Next

Configuring Port Forwarding in Windows

No Comment! Be the first one.

Leave a Reply Cancel reply

You must be logged in to post a comment.

Copyright 2026 — Lê Vũ Blog. All rights reserved. Blogsy WordPress Theme