How can we help?

How to backup & restore Phonebook + Users to another device


If you want to backup & restore phonebook entries and users from 'old' device to a 'new' one please follow the below manual. There's no matching SW/HW requirement here.

1) On the source device please connect with SSH as root and run command:

su -c "pg_dump --column-inserts --data-only smseagle --table=pbk --table=pbk_groups --table=pbk_shifts --table=user --table=user_settings --table=user_group --table=shift_contact> /tmp/" postgres
2) Now connect with SFTP to the source device (also as root) and download the file from location /tmp/

3) Push the file to the target device using SFTP

4) Connect with SSH to the target device and run commands:

a) to wipe the database - it's necessary to delete everything before restoring process:
psql -U postgres smseagle --command="TRUNCATE TABLE \"pbk\", \"pbk_groups\", \"pbk_shifts\", \"user_group\", \"user_settings\", \"shift_contact\", \"user\" CASCADE;"

b) to restore your backup:

su -c "psql smseagle < /tmp/" postgres
Was this article helpful?
0 out of 0 found this helpful