FoolFuuka: Difference between revisions

From Bibliotheca Anonoma
No edit summary
No edit summary
Line 8: Line 8:


* [https://github.com/pleebe/FoolFuuka pleebe/FoolFuuka] - The 4plebs fork of FoolFuuka is the mainline fork used by 4plebs, Desuarchive, RebeccaBlackTech, and many other archivers.
* [https://github.com/pleebe/FoolFuuka pleebe/FoolFuuka] - The 4plebs fork of FoolFuuka is the mainline fork used by 4plebs, Desuarchive, RebeccaBlackTech, and many other archivers.
* [ bibanon/asagi] - The bibanon fork of Asagi is the mainline fork used by Desuarchive, RebeccaBlackTech, and Archived.moe.  
* [https://github.com/bibanon/asagi bibanon/asagi] - The bibanon fork of Asagi is the mainline fork used by Desuarchive, RebeccaBlackTech, and Archived.moe.  
* [ pleebe/4plebs-X] - 4plebs developed a new client-side Javascript interface (based on 4chan-X code) for the FoolFuuka/Asagi stack by adding 4chan API compatibility to FoolFuuka. Requires the plugin pleebe/foolfuuka-plugin-fourchan-api below.
* [https://github.com/pleebe/4plebs-X pleebe/4plebs-X] - (In development) 4plebs developed a new client-side Javascript interface (based on 4chan-X code) for the FoolFuuka/Asagi stack by adding 4chan API compatibility to FoolFuuka. Public preview available at test.4plebs.org . Requires the plugin pleebe/foolfuuka-plugin-fourchan-api below.


=== Plugins ===
=== Plugins ===

Revision as of 18:26, 31 March 2019

FoolFuuka-and-Asagi.png

FoolFuuka is a PHP web viewer paired with the Asagi archiver. It was developed by the FoolCode team who originally made this fork for archive.foolz.us. Currently, it is maintained by 4plebs.

Source Code

Since the main developers of Asagi (Eksopl) and FoolFuuka (FoolCode) have stepped away from anything more than maintenance development ever since they stopped operating 4chan Archivers, these two forks are the mainline development repositories for the FoolFuuka/Asagi stack in a multiorganizational collaboration between 4plebs and the Bibliotheca Anonoma.

  • pleebe/FoolFuuka - The 4plebs fork of FoolFuuka is the mainline fork used by 4plebs, Desuarchive, RebeccaBlackTech, and many other archivers.
  • bibanon/asagi - The bibanon fork of Asagi is the mainline fork used by Desuarchive, RebeccaBlackTech, and Archived.moe.
  • pleebe/4plebs-X - (In development) 4plebs developed a new client-side Javascript interface (based on 4chan-X code) for the FoolFuuka/Asagi stack by adding 4chan API compatibility to FoolFuuka. Public preview available at test.4plebs.org . Requires the plugin pleebe/foolfuuka-plugin-fourchan-api below.

Plugins

Installation

Administration

Architecture

An advanced section for setting up the architecture needed to run FoolFuuka/Asagi/SphinxSearch at scale.

  • FoolFuuka/Nginx
  • FoolFuuka/MySQL - We use Percona MariaDB, a version of MySQL. It is also tokudb.
  • FoolFuuka/Sphinx/Advanced - At Desuarchive the search server serves both Desuarchive and Rbt.asia, and is hosted on a server seperate from the frontend, database, and scraper with OpenVPN connecting the two.

Backups

FoolFuuka/Asagi is notorious for their large and unwieldy database. We use this command to do daily and weekly dumps without getting locking problems.

mysqldump -u $DB_user -h $DB_host -p$DB_pass --opt --single-transaction --quick --lock-tables=false $DB $t | gzip > $DIR/$DB-$t.sql.gz

Dumping FoolFuuka Tables without leaking IPs or Passwords

Don't just release the bare SQL dump into the wild. This script will dump to CSV, which is actually quite easy to import back.

SELECT `doc_id`, `media_id`, `num`, `subnum`, `thread_num`, `op`, `timestamp`, `timestamp_expired`, `preview_orig`, `preview_w`, `preview_h`, `media_filename`, `media_w`, `media_h`, `media_size`, `media_hash`, `media_orig`, `spoiler`, `deleted`, `capcode`, `email`, `name`, `trip`, `title`, `comment`, `sticky`, `locked`, `poster_hash`, `poster_country`, `exif`
FROM `pol`
INTO OUTFILE "/tmp/a.csv"
  FIELDS TERMINATED BY ',' ENCLOSED BY '"'
  LINES TERMINATED BY "\n";

Automatic Full SQL DB Backups

crontab -e

   0 3 * * * /bin/bash /home/atc/sql/full.sh

That script back up foolfuuka rbt_foolfuuka asagi

Iterates through each DB

/home/atc/sql/desu - Writes gzip’d SQL files here (normal to be empty)

Uploads to encrypted RClone folder

Automatic CSV Dumps as seen on Internet Archive

   php /home/atc/backup.php

Backupbot Database

``` CREATE DATABASE backupbot DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;

 GRANT ALL PRIVILEGES ON `backupbot`. * TO 'backupbot'@'localhost';
 GRANT FILE ON *.* TO 'backupbot'@'localhost';
 GRANT SELECT ON `asagi`.* TO 'backupbot'@'localhost';
 GRANT SELECT ON `foolfuuka`.* TO 'backupbot'@'localhost';
 GRANT SELECT ON `rbt_foolfuuka`.* TO 'backupbot'@'localhost';
 flush privileges;
 use backupbot;
 create table backupstats (
     board VARCHAR(20) PRIMARY KEY,
     lastid INT
 );

```