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

Restoring database from backup #1019

Open
allenerenee opened this issue Apr 12, 2021 · 3 comments
Open

Restoring database from backup #1019

allenerenee opened this issue Apr 12, 2021 · 3 comments

Comments

@allenerenee
Copy link

I used Timeshift to make a backup of all my files in the middle of January, just before upgrading from Mint 18.3 to Mint 19.3. It made a backup of my recipe database with the extension *.db.backup
In the middle of February, my hard drive died.
Poking around a little, I am not able to simply open the file with Gourmet 0.17 or the Python3 version, nor does following the instructions found at https://linuxhint.com/backup-restore-sqlite/ (my new system tells me the file is an SQlite database)
How can I restore my (sizable) recipe collection from the *.db.backup file?

Expected Behavior

Gourmet should recognize and be able to restore backups made from system utilities such as timeshift.

Current Behavior

Currently, attempting to restore the file produce no results.

Environment

  • Operating System:
  • Version or commit id:
  • Installed as Flatpak or Python package?:
    Database made in Python package in Linux Mint 18.3 via Timeshift.
    Attempting to restore in MX Linux KDE 19, from the flatpak editions.
    System data:
    [code]
    System:
    Host: Kernel: 5.10.0-5mx-amd64 x86_64 bits: 64 compiler: N/A
    parameters: ro root=UUID=
    initrd=boot\initrd.img-5.10.0-5mx-amd64
    Desktop: KDE Plasma 5.14.5 wm: kwin_x11 dm: SDDM
    Distro: MX-19.4_kde_x64 patito feo March 31 2021
    base: Debian GNU/Linux 10 (buster)
    Machine:
    Type: Laptop System: LENOVO product: 20U3CTO1WW v: ThinkPad L15 Gen 1
    serial: Chassis: type: 10 serial:
    Mobo: LENOVO model: 20U3CTO1WW v: SDK0J40709 WIN serial: UEFI: LENOVO
    v: R17ET25W (1.08 ) date: 12/08/2020
    Battery:
    ID-1: BAT0 charge: 26.8 Wh condition: 46.9/45.7 Wh (103%) volts: 11.3/11.1
    model: Celxpert 5B10W13897 type: Li-poly serial: status: Discharging
    cycles: 1
    CPU:
    Topology: Dual Core model: Intel Core i3-10110U bits: 64 type: MT MCP
    arch: Kaby Lake family: 6 model-id: 8E (142) stepping: C (12) microcode: DE
    L2 cache: 4096 KiB
    flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 20799
    Speed: 800 MHz min/max: 400/4100 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800
    Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled
    Type: l1tf status: Not affected
    Type: mds status: Not affected
    Type: meltdown status: Not affected
    Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
    Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
    Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
    Type: srbds mitigation: TSX disabled
    Type: tsx_async_abort status: Not affected
    Graphics:
    Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: Lenovo driver: i915
    v: kernel bus ID: 00:02.0 chip ID: 8086:9b41
    Display: x11 server: X.Org 1.20.10 driver: modesetting unloaded: fbdev,vesa
    compositor: kwin_x11 resolution: 1366x768~60Hz
    OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 20.3.4
    direct render: Yes
    Audio:
    Device-1: Intel Comet Lake PCH-LP cAVS vendor: Lenovo driver: snd_hda_intel
    v: kernel bus ID: 00:1f.3 chip ID: 8086:02c8
    Sound Server: ALSA v: k5.10.0-5mx-amd64
    Network:
    Device-1: Intel Ethernet I219-V vendor: Lenovo driver: e1000e v: kernel port: efa0
    bus ID: 00:1f.6 chip ID: 8086:0d4f
    IF: eth0 state: down mac:
    Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel port: efa0 bus ID: 04:00.0
    chip ID: 8086:2723
    IF: wlan0 state: up mac:
    Drives:
    Local Storage: total: 931.51 GiB used: 107.51 GiB (11.5%)
    ID-1: /dev/sda vendor: Western Digital model: WD10SPSX-08A6W size: 931.51 GiB
    block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 7200 rpm
    serial: rev: 1A01 scheme: GPT
    Partition:
    ID-1: / raw size: 48.83 GiB size: 47.81 GiB (97.92%) used: 10.94 GiB (22.9%)
    fs: ext4 dev: /dev/sda6
    ID-2: /home raw size: 642.58 GiB size: 631.49 GiB (98.27%) used: 96.58 GiB (15.3%)
    fs: ext4 dev: /dev/sda8
    ID-3: swap-1 size: 9.77 GiB used: 0 KiB (0.0%) fs: swap swappiness: 15 (default 60)
    cache pressure: 100 (default) dev: /dev/sda7
    Sensors:
    System Temperatures: cpu: 39.0 C mobo: N/A
    Fan Speeds (RPM): cpu: 0
    Repos:
    No active apt repos in: /etc/apt/sources.list
    Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
    1: deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ buster main
    Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian buster-updates main contrib non-free
    Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian buster main contrib non-free
    2: deb http://deb.debian.org/debian-security buster/updates main contrib non-free
    Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://mirrors.rit.edu/mxlinux/mx-packages/mx/repo/ buster main non-free
    2: deb http://mirrors.rit.edu/mxlinux/mx-packages/mx/repo/ buster ahs
    Active apt repos in: /etc/apt/sources.list.d/skype-stable.list
    1: deb [arch=amd64] https://repo.skype.com/deb stable main
    No active apt repos in: /etc/apt/sources.list.d/various.list
    Info:
    Processes: 250 Uptime: 9h 56m Memory: 7.44 GiB used: 2.87 GiB (38.6%)
    Init: SysVinit v: 2.93 runlevel: 5 default: 5 Compilers: gcc: 8.3.0 alt: 8
    Shell: quick-system-in running in: quick-system-in inxi: 3.0.36
    [/code]
@thinkle
Copy link
Owner

thinkle commented Apr 14, 2021

The file should be a SQLite file so if you can't access it with a generic SQLite tool, I'd be worried the file might be corrupt.

@allenerenee
Copy link
Author

I can access it with an SQLite database viewer, so that's not the issue. All the data seems to be fine. I just haven't the foggiest how to get it back into Gourmet, since the DB browser can only export as sql, csv, or json.

@cydanil
Copy link
Contributor

cydanil commented May 2, 2021

Hi,
You should be able to open the database by running Goumet as follows, from a terminal:

gourmet --database-url sqlite:////home/cydanil/Documents/recipes.db.backup

Note the four leading ////

If these are loaded correctly, you may look at moving the backed up database to the Gourmet directory:

cp recipes.db.backup ~/.gourmet/recipes.db

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants