IPBrick Disk migration

From wiki.IPBRICK.COM
Revision as of 10:03, 1 July 2015 by Balves (Talk | contribs)

Jump to: navigation, search

IPBrick Disk migration

Apply configuration and save the configurations file to your Desktop.

Just stop the the services you use.

/etc/init.d/asterisk stop
/etc/init.d/apache2 stop
/etc/init.d/ejabberd stop
/etc/init.d/qmail stop
...


Execute this command to backup all the data bases.

/opt/system/backupSYS/backup_DBs.php 

Install the IPBrick on the new machine or on the new disk.

Make the rsync command to copy all the data to the new disk, Some examples of rsync


rsync using local machine only, (device attached by usb)


See the disks on machine

fdisk -l

You must have 2 disk sda and sdb

And see the partition table off the two devices.

Then create 2 folders

mkdir /old_home1
mkdir /old_home2

Then we need to mount the partitions we need to copy.

mount /dev/sdb7 /old_home1
mount /dev/sdb8 /old_home2

Now lets start the rsync

rsync -aAuv /old_home1 /home1 > rsync_home1.log 2> rsync_home1.err &
rsync -aAuv /old_home2 /home2 > rsync_home2.log 2> rsync_home2.err &

You can see the logs in this file -> rsync_home1.log Or the errors in this file -> rsync_home1.err

Wen the rsync is finish access to web interface and then insert and replace the configuration that you save on your desktop.

After replacing, go to Advanced configuration -> disaster recovery -> aplication -> data bases -> and replace the last one.


Wen this Finnish test the services you have on IPBrick.


rsync using 2 IPBrick


EX: IPBrick1 New (192.168.69.199) and IPBrick2 OLD (192.168.69.200)

On machine IPBrick2 open ssh to root

cat /etc/ssh/sshusers-allowed
operator
root

insert the line root on the file.

Now lets start the rsync on IPBrick1

rsync -avz --rsh="ssh -l root" 192.168.69.200:/home1 /home1 > rsync_home1.log 2> rsync_home1.err
rsync -avz --rsh="ssh -l root" 192.168.69.200:/home2 /home2 > rsync_home2.log 2> rsync_home2.err
  • the route password will be prompt to insert.

You can see the logs in this file -> rsync_home1.log Or the errors in this file -> rsync_home1.err

Wen the rsync is finish access to web interface and then insert and replace the configuration that you save on your desktop.

After replacing, go to Advanced configuration -> disaster recovery -> aplication -> data bases -> and replace the last one.


Wen this Finnish test the services you have on IPBrick.