DEgITx / rats-search

BitTorrent P2P multi-platform search engine for Desktop and Web servers with integrated torrent client.
MIT License
1.6k stars 175 forks source link

Migrate "database" folder from Windows PC to Linux PC #93

Open slrslr opened 5 years ago

slrslr commented 5 years ago

Hello,

i stopped rats on my windows 10 pc and on linux pc (ubuntu arm).

on windows PC i had like 80 000 torrents (rats 1.1.4) on linux pc i had around 31 000 torrents (rats 1.2.2)

i renamed database folder on linux pc and copied database directory from windows pc to linux PC in aim it adopt its bigger database.

I noticed that windows PC had .0 in some database folder filenames, like: torrents.0.sps files.0.sps files.0.spp files.0.spd

on linux there was no 0. in file names, though i still tried to launch rats on linux after copying. It not updated torrent count from 31K to 80K. So i quit rats on linux and renamed files not to have "0." in filenames:

cd rats-search/database
apt install mmv
mmv '*0.*' '#1#2'

but that either not updated torrent count. i noticed that linux have not modified the files anyhow.

this is how the database directory looks on linux:

total 332M
-rw-r--r-- 1 root root    4 May 11 08:25 feed.kill
-rw-r--r-- 1 root root  297 May 11 08:25 feed.meta
-rw-r--r-- 1 root root 1.4M May 11 08:25 feed.ram
-rw-r--r-- 1 root root   14 May 11 08:25 files.kill
-rw-r--r-- 1 root root  351 May 11 08:25 files.meta
-rw-r--r-- 1 root root 100M May 11 08:02 files.ram
-rw-r--r-- 1 root root  11M May 11 08:25 files.spd
-rw-r--r-- 1 root root  33K May 11 08:25 files.spe
-rw-r--r-- 1 root root  366 May 11 08:25 files.sph
-rw-r--r-- 1 root root 6.1M May 11 08:25 files.spi
-rw-r--r-- 1 root root    0 May 11 08:25 files.spk
-rw-r--r-- 1 root root    4 May 11 08:25 files.spm
-rw-r--r-- 1 root root  12M May 11 08:26 files.spp
-rw-r--r-- 1 root root  85M May 11 08:01 files.sps
-rw-r--r-- 1 root root    4 May 11 08:25 store.kill
-rw-r--r-- 1 root root  350 May 11 08:25 store.meta
-rw-r--r-- 1 root root 128K May 11 08:25 store.ram
-rw-r--r-- 1 root root    9 May 11 08:25 torrents.kill
-rw-r--r-- 1 root root  765 May 11 08:25 torrents.meta
-rw-r--r-- 1 root root 3.6M May 11 08:25 torrents.ram
-rw-r--r-- 1 root root 6.8M May 11 08:25 torrents.spa.tmpold
-rw-r--r-- 1 root root 4.0M May 11 08:25 torrents.spd
-rw-r--r-- 1 root root  16K May 11 08:25 torrents.spe
-rw-r--r-- 1 root root  780 May 11 08:25 torrents.sph
-rw-r--r-- 1 root root 1.2M May 11 08:25 torrents.spi
-rw-r--r-- 1 root root    0 May 11 08:25 torrents.spk
-rw-r--r-- 1 root root    4 May 11 08:25 torrents.spm
-rw-r--r-- 1 root root 387K May 11 08:25 torrents.spp
-rw-r--r-- 1 root root 102M May 11 08:03 torrents.sps
-rw-r--r-- 1 root root    4 May 11 08:25 version.kill
-rw-r--r-- 1 root root  303 May 11 08:25 version.meta
-rw-r--r-- 1 root root   93 May 11 08:25 version.ram
slrslr commented 3 years ago

2 years later, i have tried to copy all database/ folder files from Windows backup to Linux /database/ folder replacing files. rats complains:

sphinx: FATAL: disk chunk /home/user/apps/rats-search/database/torrents.0: prealloc failed: failed to open file '/home/user/apps/rats-search/database/torrents.0.spk': 'No such file or directory'

this spk file, can i work around this anyhow so i can use my Windows database on Linux?

slrslr commented 3 years ago

after i have created empty files rats-search/database/files.0.spk rats-search/database/torrents.0.spk and launched rats, i see the count jumped from 400 torrents to 90000+ , it looks like it possibly worked. Yet it would be more user friendly if rats would create missing files automatically...?