Recover from Backup

From WiDirect
Jump to: navigation, search

In order to restore a backup, SSH to the WiDirect and copy the backup file to the WiDirect into the /tmp directory. This can be done several different ways as described below.

SCP 
sudo scp username@a.b.c.d:backup-XXXXX.tar.gz /tmp/. 

CD-R 
sudo mount /dev/cdrom /mnt 
sudo cp /mnt/backup-XXXXXX.tar.gz /tmp/. 
sudo umount /dev/cdrom 

Thumbdrive 
sudo mount /dev/sdb1 /mnt 
sudo cp /mnt/backup-XXXXXX.tar.gz /tmp/. 
sudo umount /dev/sdb1 

Once the backup file is run on the WiDirect, restore the backup with the following commands.

su -
cd /tmp 
gunzip /tmp/backup-XXXXXX.tar.gz 
tar xfP /tmp/backup-XXXXXX.tar 
cd /root/backup-XXXXXX 
./restoreBackup.sh
reboot

If you are restoring a WiClient then you only need to restore certain files:

su -
cd /tmp 
tar xfz /tmp/backup-XXXXXX.tar.gz
cd root/backup-XXXXXX
tar xf root.tar
mysql -uportal -pannamysql portal < mysql.sql
tar xf awicp-db.tar
cp root/AWICP/db/aplist.db /root/AWICP/db
chmod a+rw /root/AWICP/db/aplist.db
cp root/AWICP/etc/awicp-client.conf /root/AWICP/etc
reboot