Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: old history isn't shared but was imported on first sync? new history is syncing. #2389

Open
1 task done
NelsonMinar opened this issue Sep 17, 2024 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@NelsonMinar
Copy link

What did you expect to happen?

I'm a new Atuin user, username NelsonMinar. My second Atuin install isn't showing me the history from my first one. It looks like the data was copied over though.

It's possible this is my misunderstanding. Am I right: with Atuin sync when I hit Ctrl-R on any machine the popup for [ GLOBAL ] should show me roughly the same data and history size? Because for me one machine is showing history count: 8641 and the other is showing history count: 551.

Thank you for Atuin, it is very cool.

What happened?

I ran Atuin on one machine for a few weeks and successfully have been using a ~8500 line history database that I imported from several years of bash hackery. I set up Atuin sync with the cloud server, then set up the Atuin client on a second machine and logged it in to sync. The first time I ran atuin sync it said it was downloading some 16,000 records. But the history only shows 500 items on this new machine and no matter how many times I sync -f on both hosts, I can't get the old commands from the other host to show up.

New commands I've run are showing up, just not the old bash imported ones.

I tried debugging suggestions from #1596 and #2379 and didn't learn anything. The problem persists. I'm wondering if these comments about timestamps could be relevant? I believe my 8500 line bash history imported without timestamps. I do think I'm using syncv2 though.

FWIW history.db on the second machine only has 578 rows in the history table. But records.db has 16,601 rows in the store table, making me think the data did get copied over from the sync but isn't being used.

Atuin doctor output

##### Atuin Doctor

{
  "atuin": {
    "version": "18.3.0",
    "sync": {
      "cloud": true,
      "records": true,
      "auto_sync": true,
      "last_sync": "2024-09-17 0:07:47.728149404 +00:00:00"
    },
    "sqlite_version": "3.44.0"
  },
  "shell": {
    "name": "bash",
    "default": "bash",
    "plugins": [
      "atuin",
      "bash-preexec"
    ],
    "preexec": "bash-preexec"
  },
  "system": {
    "os": "Ubuntu",
    "arch": "x86_64",
    "version": "23.04",
    "disks": [
      {
        "name": "/dev/vda2",
        "filesystem": "btrfs"
      },
      {
        "name": "systemd-1",
        "filesystem": "autofs"
      },
      {
        "name": "systemd-1",
        "filesystem": "autofs"
      },
      {
        "name": "/dev/vda1",
        "filesystem": "vfat"
      }
    ]
  }
}

##### cconfig.toml

enter_accept = false
style = "compact"
[stats]
[keys]
[sync]
records = true
[preview]
[daemon]

Code of Conduct

  • I agree to follow this project's Code of Conduct
@NelsonMinar NelsonMinar added the bug Something isn't working label Sep 17, 2024
@ellie
Copy link
Member

ellie commented Oct 3, 2024

Could you share the doctor output from both machines please?

If they both have atuin.sync.records = true in the doctor output, you could try running atuin store rebuild history on the one that has a full records.db but empty history.db

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants