Gateway Backup

From KJ4BYI D-Star Wiki

Jump to: navigation, search

HELP, MY GATEWAY LOOKS LIKE IT IS STARTING TO FAIL!!!
WHAT DO I DO NOW??

FIRST THING WOULD BE BACKUP WHAT YOU CAN!
The next would be doing a dd of the coulprate drive to a new one.

For all practical purposes, a monthly back up would
not hurt at all... this can be adapted to such a need.
BUT if your on the crashward bound, this is one way to
get back up and running with minimal downtime to your
gateway users.
Please note, this will get a clean over every once in
a while, so check back on this often.


From the G2 CR-ROM

(Backup D-Star Database)

./dstar_db-backup ALL read

this creates files in the /home/postgres/

And then to Restore, Put files in /home/postgres folder, and run
./dstar_db-backup ALL write



(FOR THOSE WHO WANT TO START ON A NEW DRIVE, FRESH)


INSTRUCTION FOR A "CLEAN START INSTALLATION"

You may want to back up the postgres database up before
shutting down (power off) the server.

Stop the Dstar GW stuff issuing the following in this order,
1) service dsm stop (other wise dstar_gw stop will hang)
2) service dplus stop
3) service dstar_gw stop


Mount a usb drive to /mnt

{Backup pgsql}
tar –cvf /mnt/pgsql.tar /opt/products/dstar/pgsql/

{Backup DstarMonitor}
tar -cvf /mnt/dsm.tar /opt/dstarmon/

{Copy your config files for DSTAR_GW, and Dplus}
cp /opt/products/dstar/dstar_gw/dsgwd/dsgwd.conf /mnt/dsgwd.conf
cp /opt/products/dstar/dstar_gw/dsipsvd/dsipsvd.conf /mnt/dsipsvd.conf
cp /dstar/tools/dplus.conf /mnt/dplus.conf

**STOP**

PLEASE READ THIS HERE...

IF you have a dvd/cr-rom burner installed, you could store
your backups to /tmp and burn it to a R-dvd or R-cd-rom.
THIS CAN BE DONE VIA LOCAL GUI TOO! Be mindful though,
if your better with text command, use the text interface.

Prepare the new or replacement
drive / machine for installation.

NEXT STEP
NOW, setup NEW server / software,
DO install latest image of CentOS,
<as outlined in the software manual rp2c english pdf file>
DO install dstar_gw software,

**NOTE**
DO NOT add the GW Admin user,
DO NOT start dstar_gw software,
DO NOT do update1/2/3

Once you have completed the pre-install, mount the USB
or copy from your DVD/CD-Rom backup, the files you created
back to the /tmp folder or from the USB /mnt

Now, Restore the backup files
cd /
tar -xvf /mnt/pgsql.tar
OR
tar -xvf /tmp/pgsql.tar

Restore dstarmon
cd /
tar -xvf /mnt/dsm.tar
OR
tar -xvf /tmp/dsm.tar

Next copy the conf files back to their home....
cp /mnt/dsgwd.conf /opt/products/dstar/dstar_gw/dsgwd/dsgwd.conf
cp /mnt/dsipsvd.conf /opt/products/dstar/dstar_gw/dsipsvd/dsipsvd.conf
<or from /tmp or the dvd/cd-rom , replace /mnt with /tmp>

Now, when you start dstar_gw the postgres database should have all the
lastest data, no user registrations lost.

DPLUS INSTALLATION, ONCE YOU RESTAR THE GW, YOU CAN NOW REPLACE
THE DPLUS INSTALLATION.

For Dplus, just run this:
wget http://www.opendstar.org/tools/G2/dplus-install-g2.sh

Run the script, this will install the latest Dplus. issue a
'service dplus stop', now copy your backup of dplus.conf
back into /dstar/tools directory.
Dplus install done, now issue a 'service dplus start', your
backup dplus.conf will now be loaded and used.


(KI4SWY) Bill's NOTE:

(You can't simply "DELETE" data, no gateways or the trust
server are clearing the records, there is a config error
in ld that prevents it from working, the resolution
has been sent to the trust team two months ago, so
when a record gets marked for deleted, it slows down
db_sync_db, which does't work at all now.)


I would still recommend dd :=P

Although I tried to be as accurate as possible, I may have fat
fingered some of the above commands, or forgot some
important steps, I haven't had to restore a failing HDD
on a gw server yet, so I don't plan on having to.

Personal tools