3

I have 2 questions:

  • what's the directory and file name of a Viber messaging database so I can move it to a new device (for Intel based Macs)
  • is there any way to move history from M1 to M2 device without creating a backup file on mobile device and then syncing with Mac

On old Mac devices, I could just copy Viber app onto a new device (same for media folder) and the history would auto upload onto new Mac. There was no need for mobile sync and cloud backups.

I then bought an M1 Macbook, but after having moved the Intel based Viber app, it opened empty. I tried moving M1 Viber app to M2 Mac and the damn thing opens with empty messaging history as well.

Please help. I really need to open an old file.

Edit: I just tried copying old Viber contents to an old Intel based Macbook with the same OS version, it opens with empty history. Why???

2 Answers2

2

When I installed Viber on my Mac, it asked me whether I want to synchronize the history from the iPhone app. But if this won't help in your case, you could try to copy the old chat history from your previous Mac.

To find files related to Viber on your old Mac, you can run

find ~/Library -iname '*viber*'

At least on my Mac, this finds viber.db in ./Application Support/ViberPC/MOBILENUMBER/viber.db.

nohillside
  • 100,768
  • so bizarre, I ran the command, it shows the same path, but when I go there, no ViberPC folder is present. So than I ran open from the Terminal to see if maybe it can open, it says the file does not exist. – user400338 Apr 08 '23 at 14:10
  • 1
    @API If find finds the file, it's there :-) You did remember to use Application\ Support to protect the space character? – nohillside Apr 08 '23 at 14:16
  • ah, thank you so much! – user400338 Apr 08 '23 at 14:23
  • So I moved the files within the folder along with the viber.db file, but it still opens empty. I guess Viber made sure you can no longer keep the history unless you upload your messages to cloud huh? lol – user400338 Apr 08 '23 at 14:33
0

I was able to transfer Viber data between Macs in the following way

  1. Run Viber on the new Mac
  2. Backup created config.db file
  3. Copy data from the old Mac and replace config.db from created backup

Step by step guide

We assume that we are working under the same user on the old and new Mac, otherwise we should take care about folders/files ownership.

Old Mac

  1. Read all your messages and close Viber app
  2. Create backups
    # Home folder is a base
    cd ~
    tar -cvz -f Viber-Profiles.tar.gz "Library/Application Support/ViberPC"
    tar -cvz -f Viber-Downloads.tar.gz Documents/ViberDownloads
    
  3. Copy data to the new Mac
    # Copy to the new Mac user home folder
    scp Viber-Profiles.tar.gz Viber-Downloads.tar.gz [email protected]:
    

New Mac

  1. Install, run and activate Viber on Desktop - Set Up Viber on Your Desktop
  2. Close Viber
  3. Backup created config config.db
    # Home folder is a base
    cd ~
    cp "Library/Application Support/ViberPC/config.db" config.db.new
    
  4. Remove created Viber folders
    # To exclude mixed files from Phone/PC
    rm -rf "Library/Application Support/ViberPC"
    rm -rf Documents/ViberDownloads
    
  5. Unpack data from old Mac
    tar -xv -f Viber-Profiles.tar.gz
    tar -xv -f Viber-Downloads.tar.gz
    
  6. Replace config.db
    cp config.db.new "Library/Application Support/ViberPC/config.db"
    
  7. Start Viber and you should be able to see all chats/messages/attachments
  8. Remove backups
    # And tar.gz on old Mac as well
    rm -f config.db.new Viber-Profiles.tar.gz Viber-Downloads.tar.gz
    
Slava
  • 101
  • 2