How to Fix Missing Database Indexes Problem on NextCloudPi After Upgrade to Version 14.0.x

After upgrading an instance of NextCloudPi from version 13 to version 14, I received the following error notification:

The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster. ° Missing index "parent_index" in table "oc_share". ° Missing index "fs_mtime" in table "oc_filecache".

In short, the table “oc_share” was missing the index “parent_index” and the table “oc_filecache” was missing the index “fs_mtime”.

I tried SSH-ing to my NextCloudPi server and running the suggested command, “occ db:add-missing-indices” but it generated an error.

Despite the missing database entries, the instance still seemed to run fine, but I found the constant error message vexing.

After some online research and examination of my NextCloudPi instance’s directory structure, I found the following solution, and not seeing it posted elsewhere, thought I’d share it here:

1. SSH to your NextCloudPi instance.

2. Get a root prompt by entering:

sudo bash

3. Go up to the root directory by typing the following command twice (or as many times as necessary):

cd ../

4. Switch to the nextcloud directory:

cd /var/www/nextcloud

5. Run the following command:

sudo -u www-data php occ db:add-missing-indices

6. You should receive something like the following prompts (which I received):

Check indices of the share table.
Adding additional parent index to the share table, this can take some time...
Share table updated successfully.
Adding additional mtime index to the filecache table, this can take some time...
Filecache table updated successfully.

7. That’s all! Type “exit” and hit enter to terminate the SSH session. The error message should no longer appear.

Persian Word of the Day: نماهنگ

The Persian word for “music video” is نماهنگ. According to Wikipedia, the term was approved by the Farhangestan (Academy of Persian Language and Literature). I encountered it on the website of the office of Iranian Leader Ali Khamenei, which published a music video in connection with his audience with members of the Islamic Propagation Coordination Council. The video is captioned: نماهنگ دیدار اعضای .شورای هماهنگی تبلیغات اسلامی سراسر کشور

Persian Word of the Day: آکبند

In Persian, a commercial product that is unopened and in its original packaging is described as being آکبند. I encountered this word for the first time in an article on  Iranian tech website Digiato about restrictions on returning travelers bringing mobile phones into Iran, in the following context:

یکی از مسئولان ستاد قاچاق کالا به دیجیاتو می‌گوید که هر مسافر مجوز آوردن یک موبایل مسافرتی  (موبایل رجیسترنشده، چه آکبند باشد چه نباشد) به داخل کشور را دارد.

In a post on 1Doost.com, Nooshin Mohammad Ali provides what seems to me to be a dubious folk etymology, claiming (while citing no source) that it’s derived from the English “UK Band” which supposedly was printed on ribbons wrapped around British goods arriving at the port of Abadan before the 1979 Islamic Revolution.

An interesting but ultimately inconclusive discussion of the etymology of آکبند extracted from the Adabiyat listserv appears on The Iranian  here.

Comments welcome.

How to Use Quad9 (9.9.9.9) DNS Resolution with Algo VPN

Algo VPN is an open source project from computer security firm Trail of Bits. It facilitates the creation of a non-logging (and optionally ad-blocking) virtual private network (VPN) on a virtual private server (VPS). I’ve been using Algo VPN for a couple months and am pleased with it’s performance, particularly on Apple devices, which natively support the IKEv2 protocol implemented by Algo VPN.

By default, Algo VPN uses Google’s domain name resolution (DNS) servers (8.8.8.8 and 8.8.4.4). Recently, I heard about an alternative, non-profit DNS service called Quad9 (9.9.9.9) that has some attractive features. In particular, Quad9 blocks known malicious domains, collects no personally-identifiable information, and does not store the IP addresses of end users to disk. Steve Gibson spoke about Quad9 in episode 638 of his weekly Security Now podcast.

Perhaps in the future, Algo VPN will offer Quad9 as an alternative to Google’s DNS servers. But until such time, and for already existing installations, here’s how you can point your Algo VPN server to Quad9’s DNS servers:

1. SSH to your Algo server via your terminal app:

ssh root@ip -i ~/.ssh/algo.pem

2. Open /etc/dnsmasq.conf for editing:

nano /etc/dnsmasq.conf

3. Find the lines:

server=8.8.8.8
server=8.8.4.4

4. Replace with (the second line, not originally included here, is Quad9’s secondary IPv4 address; thanks to commenter “c.” for noting this):

server=9.9.9.9
server=149.112.112.112

5. Hit Control-X to exit, choosing Y to save and keeping the same file name.

6. Type reboot at the command line to reboot.

That’s all! Your Algo VPN server will now use Quad9 for DNS resolution.

Twitter Through Trump’s Eyes

U.S. president Donald J. Trump devotes a great deal of time to Twitter. Have you ever wondered what he sees on Twitter? I did, so I created the “Twitter Through Trump’s Eyes” public list that includes the President’s own tweets along with those of the 45 Twitter accounts that he follows. I will keep this list updated as necessary. You don’t need to have a Twitter account to view. Clicking on the image below will take you to the list.

Screenshot of the “Twitter Through Trump’s Eyes” list

 

Persian Phrase of the Day: از جمله، اما نه محدود به

Recently, the question of how best to translate the English phrase “including, but not limited to” has crossed my desk. Google Translate offers از جمله، اما نه محدود به which seems quite good, and I’ve found an example of its use (multiple times) on a webpage of Iran’s Islamic Parliament Research Center, where the “but not limited to” part is placed in parentheses از جمله (اما نه محدود به). The same page sometimes uses شامل instead of از جمله.

 

How to Upgrade to GnuPG 2.x on Ubuntu Linux

If you are using the Enigmail security add-on for Mozilla Thunderbird under Ubuntu Linux, you may have recently discovered (as I did today) that it no longer works with the version of GnuPG that you have installed, and that you need to upgrade. But it’s not evident how to do this, as there is no GnuPG update available in the Ubuntu Software Center.

Fortunately, there is an easy way to upgrade Ubuntu to GnuPG 2. Just open a terminal and type:

sudo apt-get install gnupg2

and enter your password when prompted.

English Transcript of the Iranian Television Documentary Program “Rules of the Game” (قاعده بازی)

On the evening of Monday, 15 February 2016, Iran’s television channel 3 aired a 13-minute report titled “The Rules of the Game” (in Persian, قاعده بازی) about the 17 January 2016 prisoner swap between Iran and the United States, arguing that the exchange was a victory for Iran and a loss for the United States. The program, produced by the “General Administration for Analytical and Documentary Programming” (اداره کل برنامه‌های تحلیلی و مستند) contends that the settlement of a longstanding property dispute between Iran and the United States was linked to the prisoner exchange, reporting among other things that on the day of the exchange, the U.S. flew $400 million in cash to Tehran’s Mehrabad Airport.

The following is a rough translation of the report that I have prepared. Comments are welcome.

Read More

Persian Word of the Day: تازه‌نفس

Today’s word is تازه‌نفس (tazeh-nafas), which literally means “fresh of breath” and more generally simply “fresh” or  It is especially used to describe military forces, and that is how I found it used today in an article on BBC Persian titled: آمریکا ‘صدها سرباز’ تازه نفس به هلمند می‌فرستد (“U.S. sends ‘hundreds’ of fresh soldiers to Helmand”).

Persian Word of the Day: خبرساز

In this “Persian Word of the Day” series, I’ll be highlighting noteworthy Persian words or phrases that may be of interest to fellow students of the Persian language.

Today’s word is خبرساز (khabarsaz) which literally means “news-making.” Farhang Moaser Kimia defines it as “that makes headlines, sensational” and notes that it is a new word. There is an Iranian news site called Khabarsaz.

Page 1 of 2

Powered by WordPress & Theme by Anders Norén