Category: Open source

  • Note Taking Apps

    Update 2021

    Since I wrote the post on Medium, world is a different place, with multiple options!

    Install:
    Criteria:
    – The app or service should be available at least on 2 devices (e.g Windows + Mac, or iOS + Android). Apps specific to a platform (e.g. Mac + iOS) are not included. e.g. iaWriter, Apple Notes, Ulysses, Bear, Paper by WeTransfer.
    – Browser based (only) are also included

    – ——

    | | Windows | Mac | Linux | iOs | Android |Web|Notes|
    |:–|:–|:–|:–|:–|:–|:–|:–|
    | Atom | X |X |X | | ||Open Source|
    | Box Notes| | | | | |X|Complicated feature and pricing set: https://cloud.app.box.com/v/BoxBusinessEditions|
    | Dropbox paper | | | | X | X |X|Freemium|
    | Etherpad| X | X | X | | |X|Self hosted option|
    | Evernote | X | X | | X | X |X||
    | Focuswriter | X |X | X | | || Related to Focuswriter.co?|
    | Google Keep | | | | X | X |X|Chrome Ext|
    | Haroopad | X | X | X | | ||
    | Joplin | | X | X | | ||Self hosted option |
    | [Notable](https://notable.app#download) | X | X|X | | ||
    |Notepad by Clickup||||||X|Chrome Extension|
    | Notion | X | X| | X | X |X||
    |OneNote | X | X | | X | X |X|Windows Phone + Apple Watch + Chrome Ext|
    |Remarkable | X | |X | | ||Note: [Windows App under development](https://remarkableapp.github.io/windows.html)|
    |Simplenote |X | X | X | X | X |X|from the folks at Automattic (parent company of WordPress) |
    | [Slite](https://slite.com/pricing) | X | X | | X | X |X|

    |[Stackedit ](https://stackedit.io/) | | | | | |X|Markdown, Chrome App Not updated since Mid 2019|
    |Standard Notes| X | X | X | X | X |Free trial|
    | [Turtl](https://turtlapp.com/download/)| X|X | X | X | Planned |X|Chrome/Firefox Ext|
    |Typora | X | X | X | | ||
    |Zettlr | X | X | X | | |||
    |Zoho Notebook | X|X | | X | X |X|

    —–

    Mac Only
    ~~‌~~
    —-
    Ulysses
    [Byword](https://apps.apple.com/us/app/byword/id420212497?mt=12)

    Box Notes
    Dropbox Paper
    Evernote
    Google Keep (?)
    Standard Notes
    Simplenote

    Phone based / app based.

    Others:
    Typora
    Macdown
    Atom
    Draft
    Ulysses
    Quiver
    Mou

    Online Markdown editors

    #### Dillinger
    #### Stackedit
    #### Etherpad
    #### HackMD

    Linux:
    Remarkable
    Focuswriter
    Haroopad
    UberWriter
    Ghostword (also Windows) https://wereturtle.github.io/
    ghostwriter

    Joplin (Self Hosted) https://joplinapp.org/clipper/

    Roam Research
    Notion
    [Slite](https://slite.com/pricing)

    Note Taking Updated

    https://clickup.com/blog/note-taking-apps/
    Bear
    Workflowy
    Squidnote
    Dimer (Beta, Came, Paid)

    Paper by WeTransfer

    —-

    HTML5 Markdown editor. This well-known online Markdown editor runs directly in your browser and offers much of the functionality that you’d find in any downloadable app. Dillinger allows you to preview and export your text as HTML, Styled HTML, Markdown, and as a PDF.

    – https://www.oberlo.com/blog/markdown-editors
    – https://itsfoss.com/online-markdown-editors/
    – https://github.com/ether/etherpad-lite/wiki/Sites-that-run-Etherpad-Lite and https://static.etherpad.org/index.html
    – https://daringfireball.net/projects/markdown/dingus
    – https://www.techradar.com/best/best-note-taking-app
    – https://www.lifewire.com/best-note-taking-apps-4136590
    – https://collegeinfogeek.com/best-note-taking-apps/
    – https://flight-manual.atom.io/hacking-atom/sections/hacking-on-atom-core/
    – https://standardnotes.org/extensions
    – https://itsfoss.com/note-taking-apps-linux/

  • Working with Audio Files using FFmpeg

    In this tutorial, we will learn working with audio files using FFmpeg to extract audio from video files, convert audio files between different formats, change audio quality and parameters, and add metadata to audio files.

    (more…)

  • Tutorial: Create a Video from images using FFmpeg

    In this tutorial, we will learn how to merge up to 10 images from a single folder to create a video using FFmpeg on a Linux Debian machine. We will start with simple iterations and gradually add more complex features to our video. (more…)

  • How to Expand Encrypted Disk on Ubuntu Linux

    The process to expand an encrypted disk on Ubuntu Linux can be a complex process if not done correctly. W may need to take these steps because encrypted Disk on Ubuntu Linux can sometimes show smaller disk size compared to the disk capacity. I asked Mixtral LeChat, what this problem was and how to fix the issue.
    (more…)

  • Multimedia in Linux

    In this chapter, we’ll explore how to handle multimedia files (audio, video, and images) directly from the command line. You’ll learn how to play, edit, and convert multimedia files using powerful tools like ffmpeg, mpv, and imagemagick. By the end of this chapter, you’ll be able to manage multimedia files efficiently without relying on graphical applications.


    1. Why Learn Multimedia in the Command Line?

    Command-line multimedia tools are:
    Lightweight: They consume fewer resources compared to graphical applications.
    Powerful: They offer advanced features for editing, converting, and processing multimedia files.
    Automation-Friendly: They can be scripted for batch processing and automation.
    Remote Work: They are ideal for managing multimedia files on remote servers or headless systems.


    2. Playing Audio and Video

    Using mpv

    mpv is a versatile media player that supports a wide range of audio and video formats.

    • Install mpv:
      $ sudo apt install mpv # Debian/Ubuntu 
      $ sudo dnf install mpv # Red Hat/Fedora
    • Play a Media File: $ mpv file.mp4
    • Play in the Background: $ mpv --no-video file.mp3

    Using mplayer

    mplayer is another popular command-line media player.

    • Install mplayer:
      $ sudo apt install mplayer # Debian/Ubuntu 
      $ sudo dnf install mplayer # Red Hat/Fedora
    • Play a Media File:
      $ mplayer file.mp4

    3. Editing and Converting Multimedia

    Using ffmpeg

    ffmpeg is a powerful tool for editing, converting, and processing multimedia files.

    • Install ffmpeg:
      $ sudo apt install ffmpeg # Debian/Ubuntu 
      $ sudo dnf install ffmpeg # Red Hat/Fedora
    • Convert a Video File:
      $ ffmpeg -i input.mp4 output.avi
    • Extract Audio from a Video:
      $ ffmpeg -i input.mp4 -q:a 0 -map a output.mp3
    • Resize a Video:
      $ ffmpeg -i input.mp4 -vf scale=640:360 output.mp4

    Using imagemagick

    imagemagick is a suite of tools for editing and converting images.

    • Install imagemagick:
      $ sudo apt install imagemagick # Debian/Ubuntu 
      $ sudo dnf install imagemagick # Red Hat/Fedora
    • Resize an Image:
      $ convert input.jpg -resize 50% output.jpg
    • Convert Image Formats:
      $ convert input.png output.jpg

    4. Working with Images

    Viewing Images

    Use feh to view images from the command line.

    • Install feh:
      $ sudo apt install feh # Debian/Ubuntu 
      $ sudo dnf install feh # Red Hat/Fedora
    • View an Image:
      $ feh image.jpg

    Creating Image Slideshows

    Use feh to create a slideshow of images:

    $ feh -D 5 -F -Z /path/to/images/
    • -D 5: Delay of 5 seconds between images.
    • -F: Fullscreen mode.
    • -Z: Automatically zoom images to fit the screen.

    5. Practical Examples

    Batch Convert Images

    Convert all .png files in a directory to .jpg:

    $ for file in *.png; do convert "$file" "${file%.png}.jpg"; done

    Extract Audio from Multiple Videos

    Extract audio from all .mp4 files in a directory:

    $ for file in *.mp4; do ffmpeg -i "$file" -q:a 0 -map a "${file%.mp4}.mp3"; done

    Create a Video Slideshow

    Combine images into a video slideshow using ffmpeg:

    $ ffmpeg -framerate 1 -i image%d.jpg -c:v libx264 -r 30 -pix_fmt yuv420p slideshow.mp4

    6. Practice Time!

    Let’s put your new skills to the test:
    1. Use mpv to play a video file and adjust playback speed.
    2. Convert a .mp4 video to .avi using ffmpeg.
    3. Resize an image to 50% of its original size using imagemagick.
    4. Create a slideshow of images using feh.


    Command-line multimedia tools like ffmpeg, mpv, and imagemagick are powerful and versatile, allowing you to handle audio, video, and images efficiently. By mastering these tools, you can streamline your multimedia workflows, automate repetitive tasks, and manage files effectively without relying on graphical applications.

  • Customizing Debian VPS Setup with Shell Script

    I use some automation with custom script for Debian VPS Setup with Shell Script. As a subscriber to multiple VPS providers, I often find myself repeating the same setup steps whenever I provision or recreate a server. These steps include disk encryption, firewall configuration, installing essential utilities, and customizing the environment. To streamline this process, I initially created an automation script in early 2024.
    (more…)

  • HestiaCP Web Control Panel :  Powerful Open Source Server Panel

    HestiaCP Web Control Panel : Powerful Open Source Server Panel

    Let us learn about HestiaCP Web Control Panel in this post.This blog post also outlines the differences between open source projects – HestiaCP and VestaCP in development, interface, security, and features.

    इस ब्लॉग पोस्ट में ओपन सोर्स वेब होस्टिंग कंट्रोल पैनल्स HestiaCP और VestaCP की तुलना की गई है। इसमें उनके विकास, इंटरफेस, सुरक्षा, और फीचर्स में अंतर को उजागर किया गया है। यह लेख पाठक को वेब सर्वर को कुशलतापूर्वक प्रबंधित करने के लिए सूचित निर्णय लेने में मदद करता है।

    (more…)

  • How to use Rclone for Backups and Cloud Storage Management

    How to use Rclone for Backups and Cloud Storage Management

    In this post, we will explore how to use RClone for backups. Often described as the “Swiss army knife of cloud storage,” Rclone offers a versatile command-line interface that mirrors familiar Unix commands such as rsync, cp, mv, ls, and more. This unified interface excels in managing multiple cloud accounts, automating backups, and performing advanced operations across diverse storage providers, making it an essential tool for both personal and enterprise use.

    Rclone is a powerful command-line program designed to manage files on cloud storage. It supports over 40 cloud storage products including Google Drive, Amazon S3, Dropbox, and Microsoft OneDrive, making it a versatile tool for backup and synchronization tasks.

    Rclone for Backups

    What is Rclone??

    Rclone is an open-source tool that allows you to sync files between your local system and various cloud storage providers. It provides a unified interface for managing different cloud services through simple commands. Rclone is a versatile command-line program for managing files on cloud storage. It supports syncing, copying, and moving files across various cloud providers including Google Drive, Amazon S3, and OneDrive. Features include server-side transfers, encryption, compression, and automated backup capabilities for efficient data management.

    हिंदी सारांश

    Rclone एक ओपन-सोर्स टूल है जो आपको अपने लोकल सिस्टम और विभिन्न क्लाउड स्टोरेज प्रोवाइडर्स के बीच फ़ाइलों को सिंक करने की अनुमति देता है। यह सरल कमांड्स के माध्यम से विभिन्न क्लाउड सेवाओं को प्रबंधित करने के लिए एकीकृत इंटरफेस प्रदान करता है। Rclone एक बहुमुखी कमांड-लाइन प्रोग्राम है जो क्लाउड स्टोरेज पर फ़ाइलों को प्रबंधित करता है। यह Google Drive, Amazon S3, और OneDrive जैसे विभिन्न क्लाउड प्रदाताओं के बीच फ़ाइलों को सिंक, कॉपी और मूव करने का समर्थन करता है। इसमें सर्वर-साइड ट्रांसफर, एन्क्रिप्शन, कंप्रेशन और स्वचालित बैकअप क्षमताएं शामिल हैं जो डेटा प्रबंधन को कुशल बनाती हैं।

    मराठी सारांश

    Rclone हे एक ओपन-सोर्स टूल आहे जे आपल्याला स्थानिक सिस्टम आणि विविध क्लाउड स्टोरेज प्रोवाइडर्स दरम्यान फाइल्स सिंक करण्याची परवानगी देते. हे सोप्या कमांड्सद्वारे विविध क्लाउड सेवा व्यवस्थापित करण्यासाठी एकात्मिक इंटरफेस प्रदान करते. Rclone हे एक बहुउपयोगी कमांड-लाइन प्रोग्राम आहे जे क्लाउड स्टोरेजवर फाइल्स व्यवस्थापित करते. हे Google Drive, Amazon S3, आणि OneDrive सारख्या विविध क्लाउड प्रदात्यांमध्ये फाइल्स सिंक, कॉपी आणि हलवण्यास समर्थन देते. यात सर्व्हर-साइड ट्रान्सफर, एन्क्रिप्शन, कंप्रेशन आणि स्वयंचलित बॅकअप क्षमता समाविष्ट आहेत जे डेटा व्यवस्थापन कार्यक्षम बनवतात.

    Rclone features. Blog post on Rclone for Backups

    Features of Rclone

    • Connect to over 40 different cloud storage providers with a single tool
    • Sync files and directories between your local system and cloud storage
    • Mount cloud storage as a local filesystem on your computer
    • Encrypt sensitive data before uploading to cloud storage
    • Automate backups with scheduling and scripts

    Implementation Guide

    1. Download Rclone from the official website
    2. Install Rclone on your system (Windows, macOS, Linux, or other OS)
    3. Run rclone config to set up your first cloud storage connection
    4. Begin using basic commands like rclone copy and rclone sync

    Cloud Storage Management with Rclone

    Cloud storage management

    Rclone allows users to manage files across multiple cloud storage services with a single tool. Whether you’re a developer in Bengaluru managing multiple projects, a photographer in Mumbai backing up precious images, or a business in Pune looking for cost-effective storage solutions, Rclone provides the flexibility and power to handle your cloud storage needs.

    Key Features & Capabilities of RClone

    • Connect to over 40 cloud storage providers including popular services in India
    • Sync files between your laptop in Delhi and cloud storage seamlessly
    • Transfer files directly between cloud providers without using your bandwidth
    • Encrypt sensitive data before uploading to ensure privacy
    • Mount cloud storage as a local disk on your computer
    • Schedule automated backups during off-peak hours (like 2 AM when internet speeds are faster in India)

    File syncing
    Cloud operations.RClone for backups

    Implementation Guide

    1. Choose your cloud storage provider (Google Drive, Amazon S3, OneDrive, etc.)
    2. Configure Rclone to connect to your cloud storage using rclone config
    3. Use simple commands to manage your files:
      • Copy: $ rclone copy source:path dest:path
      • Sync: $ rclone sync source:path dest:path
      • List: $ rclone ls remote:path
    4. Set up regular backups using cron jobs or scheduled tasks

    Implementation Guide

    1. Visit the official Rclone documentation for detailed guides
    2. Check the Rclone forum for community support
    3. Run rclone -h for command help
    4. Use rclone config file to locate your configuration file for reference

    Getting Started with Rclone

    To begin using Rclone, install it on your system, which supports Windows, macOS, and Linux. Follow these steps to set up Rclone and verify its installation.

    Installation Commands

    Windows

    1. Download the latest executable from the official Rclone website.
    2. Extract the ZIP file to a folder, such as C:\Rclone.
    3. Add the folder to your system PATH for command-line access.

    macOS

    $ brew install rclone

    Linux

    $ curl https://rclone.org/install.sh | sudo bash

    Verify Installation

    Confirm Rclone is installed correctly by running:

    $ rclone version

    Installation and Basic Setup

    Rclone installation. RClone for backups

    Platform-Specific Installation Instructions

    Linux

    Most Linux distributions used in India can install Rclone with a simple command:

    $ curl https://rclone.org/install.sh | sudo bash

    For Ubuntu/Debian-based systems, you can also use:

    $ sudo apt install rclone

    macOS

    For Mac users, the easiest way is via Homebrew:

    $ brew install rclone

    Windows

    1. Download the latest release from the official Rclone website
    2. Extract the ZIP file to a folder like C:\Program Files\Rclone
    3. Add this folder to your PATH environment variable to use Rclone from any command prompt

    Technical Implementation Options

    • Run Rclone on virtually any device, from home computers to VPS servers
    • Configure multiple cloud storage accounts in one place
    • Create encrypted connections to protect sensitive data
    • Set up mountpoints to access cloud storage like local drives
    • Customize settings for Indian internet conditions (like bandwidth limiting during peak hours)
    RClone for backups
    RClone menu for backups

    Configuring RClone

    1. Install Rclone using the instructions above
    2. Run the configuration wizard to connect to your cloud service:
      $ rclone config
    3. Follow the interactive prompts to:
      • Choose your cloud provider
      • Authenticate with your account credentials
      • Name your remote connection (e.g., “gdrive” or “onedrive”)
    4. Verify your setup by listing files:
      $ rclone ls remote_name:

    Zoho WorkDrive Configuration with Rclone

    Graphical installer for connecting Zoho WorkDrive to Rclone

    Zoho WorkDrive is a popular cloud storage solution among Indian businesses for team collaboration and file sharing. Configuring it with Rclone allows you to automate backups, synchronize files, and integrate it with your existing workflows.

    Technical Implementation Options

    • Connect Rclone to your Zoho WorkDrive account
    • Backup important business documents automatically
    • Sync files between local systems and WorkDrive teams
    • Access WorkDrive files through command line
    • Schedule regular backups of critical team data

    Implementation Guide

    1. Create API credentials in Zoho Developer Console:
      • Visit Zoho API Console
      • Create a new client under “Server-based Applications”
      • Select “WorkDrive” scope
      • Note down Client ID and Client Secret

      Follow the prompts to authenticate securely.

    2. Configure Rclone for WorkDrive:
      $ rclone config
      • Choose “n” for new remote
      • Name your remote (e.g., “workdrive”)
      • Select “Zoho WorkDrive” from the list
      • Enter your Client ID and Client Secret
      • Complete the authentication process
    3. Test your configuration:
      $ rclone lsd workdrive:

      Create a dedicated folder structure, such as workdrive:/team-backups/, to organize files.

    VPS Backup Workflows with Rclone

    VPS backup workflow RClone for backups : Sync local file with server

    For many Indian businesses and developers, Virtual Private Servers (VPS) contain critical applications and databases that demand reliable backup solutions. Rclone provides an efficient way to create secure, automated backups from your VPS to various cloud storage providers, ensuring data safety even during server issues.

    Practical Use Case Scenarios

    • Backup entire VPS including databases, websites, and configuration files
    • Schedule backups during low-traffic hours (like 2-4 AM Indian time)
    • Store backups on cost-effective cloud storage like Backblaze B2 or Google Drive
    • Implement retention policies to manage storage costs
    • Set up email notifications for backup success or failure

    Implementation Guide

    1. Set up your cloud storage provider in Rclone:
      $ rclone config

      Follow the prompts to authenticate and name your remote (e.g., “vps-backup”).

    2. Create a comprehensive backup script:
      #!/bin/bash
      # Set PATH for cron environment
      PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
      export PATH
      
      # Backup directories and settings
      TIMESTAMP=$(date +"%Y-%m-%d-%H%M")
      BACKUP_DIR="/tmp/vps-backup-${TIMESTAMP}"
      REMOTE="vps-backup:server-backups/${TIMESTAMP}"
      LOG_FILE="/var/log/vps-backup.log"
      
      # Create backup directory
      mkdir -p $BACKUP_DIR
      
      # Database backup function
      backup_database() {
          echo "Backing up MySQL databases..." >> $LOG_FILE
          mysqldump --all-databases -u root -p"YOUR_PASSWORD" > $BACKUP_DIR/all-databases.sql
      }
      
      # Web files backup function
      backup_web_files() {
          echo "Backing up web files..." >> $LOG_FILE
          cp -r /var/www $BACKUP_DIR/www
      }
      
      # Config files backup function
      backup_configs() {
          echo "Backing up configuration files..." >> $LOG_FILE
          mkdir -p $BACKUP_DIR/etc
          cp -r /etc/nginx $BACKUP_DIR/etc/
          cp -r /etc/apache2 $BACKUP_DIR/etc/
          cp -r /etc/php $BACKUP_DIR/etc/
      }
      
      # Run backup functions
      echo "Starting VPS backup at $(date)" >> $LOG_FILE
      backup_database
      backup_web_files
      backup_configs
      
      # Upload to cloud storage
      echo "Uploading to cloud storage..." >> $LOG_FILE
      rclone copy $BACKUP_DIR $REMOTE --progress --create-empty-src-dirs --log-file=$LOG_FILE
      
      # Clean up local backup
      echo "Cleaning up temporary files..." >> $LOG_FILE
      rm -rf $BACKUP_DIR
      echo "VPS backup completed at $(date)" >> $LOG_FILE
      

      Save as vps-backup.sh, make executable with chmod +x vps-backup.sh, and replace YOUR_PASSWORD with your database password.

    3. Schedule regular backups with cron:
      $ crontab -e

      Add scheduling entries like:

      # Daily at 3 AM
      0 3 * * * /path/to/vps-backup.sh
      # Weekly on Sunday at 3 AM
      0 3 * * 0 /path/to/vps-backup.sh
      # Monthly on the 1st at 4 AM
      0 4 1 * * /path/to/vps-backup.sh
      

      Monitor status with notifications:

      echo "Backup completed at $(date)" | mail -s "VPS Backup Status" your@email.com
    4. Test your backup and restoration process regularly

    Core Rclone Commands and Usage

    Listing files on remote server using Rclone

    While Rclone offers numerous advanced features, mastering a few core commands can help you manage most cloud storage tasks efficiently. Whether you’re backing up documents from Mumbai or syncing project files in Bengaluru, these essential commands work consistently across all supported cloud providers.

    backup data from laptop to rclone
    backup data from laptop using rclone

    Practical Use Case Scenarios

    • Copy files and directories between local and cloud storage
    • Synchronize folders to maintain identical content
    • List files, directories, and check storage space
    • Move, delete, and check files across storage providers
    • Mount cloud storage as a local drive for direct access

    Simplest way for Rclone file transfer using command line

    Common Commands

    1. Use rclone copy to transfer files without deleting anything:
      rclone copy /local/path remote:path
    2. Use rclone sync for exact mirroring (use carefully as it deletes files):
      rclone sync /local/path remote:path
    3. Check space usage with rclone about:
      rclone about remote:
    4. List directories with rclone lsd:
      rclone lsd remote:
    5. Mount cloud storage locally:
      rclone mount remote:path /mount/point &

    Key Takeaways

    Rclone offers a robust solution for Indian users navigating diverse cloud storage needs. Its ability to unify multiple providers, automate secure backups, and optimize performance under variable internet conditions makes it indispensable for developers, businesses, and individuals alike.

    • Unified management of over 40 cloud storage providers through a single tool
    • Automated backups that work reliably even with inconsistent connections
    • Secure data transfers with built-in encryption for sensitive information
    • Cost optimization by efficiently utilizing storage space across providers
    • Scalable solutions suitable for everything from personal backups to enterprise deployments

    Retracing the Steps

    1. Start with basic file operations (copy, sync) to become familiar with the Rclone workflow
    2. Gradually implement automation through scripts and scheduled tasks
    3. Add encryption for sensitive data when needed
    4. Optimize performance with appropriate flags based on your connection quality
    5. Join the Rclone community for ongoing support and advanced configurations

    Conclusion

    Rclone in action

    Rclone stands as a powerful ally in the quest for efficient cloud storage management. Throughout this guide, we’ve explored how this versatile tool enables Indian users to navigate the unique challenges of managing data across multiple cloud providers, often within connectivity constraints common across the subcontinent.

    The strength of Rclone lies in its flexibility—whether you’re a solo developer in Pune backing up project files, an IT manager in Delhi synchronizing team documents to Zoho WorkDrive, or a photographer in Kolkata archiving large image files across multiple storage providers. Its command-line interface might initially seem daunting, but the investment in learning basic commands pays dividends through powerful automation capabilities.

    For businesses across India embracing digital transformation, Rclone offers a cost-effective approach to cloud storage management without vendor lock-in. The ability to script operations and schedule them during periods of better connectivity (like the early morning hours when internet speeds are typically faster in many Indian cities) demonstrates how Rclone can be tailored to local infrastructure realities.

    As cloud services continue to evolve, Rclone’s active development ensures it will remain relevant for years to come. Whether you’re implementing a 3-2-1 backup strategy for critical business data or simply looking for a reliable way to sync your documents across devices, Rclone provides the foundation for a robust cloud storage management approach that grows with your needs.

    Frequently Asked Questions

    Does Rclone Replace Traditional Backup Software?

    Rclone complements rather than replaces traditional backup software. While it excels at file transfers and synchronization across cloud providers, dedicated backup solutions may offer additional features like versioning, system-level backups, or graphical interfaces. However, Rclone’s flexibility allows integration with scripts to create customized backup workflows tailored to specific needs.

    Is Rclone Difficult to Learn for Non-Technical Users?

    Rclone’s command-line interface may present a learning curve for non-technical users, but its basic operations are straightforward to master with practice. Graphical interfaces, such as Rclone Browser, are available for those preferring a visual approach, enabling users to manage cloud storage without extensive command-line knowledge.

    Which Cloud Storage Providers Work with Rclone?

    Rclone supports over 40 cloud storage providers, including widely used services like Google Drive, Amazon S3, Microsoft OneDrive, Dropbox, Backblaze B2, Koofr, pCloud, and Zoho WorkDrive. It also accommodates standard protocols such as WebDAV, FTP, and SFTP, ensuring compatibility with nearly any storage service.


    Cloudflare R2 CDN Setup with Rclone

    Cloudflare R2 configuration

    Cloudflare R2 offers a cost-effective object storage solution, particularly valuable for Indian businesses seeking to distribute images, videos, and other assets via a Content Delivery Network (CDN). Integrating R2 with Rclone enables efficient file management and CDN distribution, minimizing costs and latency.

    Technical Implementation Options

    • Create and manage R2 buckets for storing media assets
    • Configure Rclone to sync local files to R2 for CDN distribution
    • Optimize storage costs with lifecycle policies
    • Integrate with existing workflows for automated asset uploads

    Implementation Guide

    1. Create an R2 bucket:
      • Log in to the Cloudflare Dashboard
      • Navigate to R2 > Create Bucket and name it (e.g., cdn-assets)
      • Enable public access if serving files via CDN
    2. Obtain API credentials:
      • Go to R2 > Manage R2 API Tokens > Create API Token
      • Note the Access Key ID and Secret Access Key
      • Record the S3-compatible endpoint (e.g., https://.r2.cloudflarestorage.com)
    3. Configure Rclone for R2:
      rclone config
      • Select n for a new remote
      • Name it (e.g., r2-cdn)
      • Choose Amazon S3 as the provider
      • Enter the Access Key ID and Secret Access Key
      • Set the endpoint to your R2 endpoint
      • Leave region blank and disable session tokens
    4. Sync files to R2:
      rclone sync /local/media r2-cdn:cdn-assets --progress
    5. Configure CDN distribution:
      • Link a custom domain in Cloudflare to your R2 bucket
      • Enable caching and set edge TTL for optimal performance
    6. Optimize costs:
      • Implement lifecycle rules to delete old files: rclone delete r2-cdn:cdn-assets --min-age 30d
      • Monitor usage in the Cloudflare Dashboard to avoid unexpected charges

    For Indian businesses, R2’s zero-egress-fee model is particularly advantageous, reducing costs when serving content to users across South Asia.

    Troubleshooting and Optimization

    Rclone troubleshooting options

    Indian users may face challenges like inconsistent internet speeds or ISP throttling. This section provides solutions to common issues and optimization techniques for Rclone.

    Performance Enhancement Techniques

    • Diagnose transfer issues with verbose logging and connection checks
    • Optimize for variable internet speeds common in India
    • Handle quota limits on free-tier cloud accounts
    • Tune performance for specific providers like Google Drive or Amazon S3

    Implementation Guide

    1. Address common issues:
      • Slow Transfer Speeds: Limit bandwidth during peak hours (9 AM–5 PM):
        rclone copy /source remote:dest --bwlimit 1M

        Add retries for unstable connections:

        rclone copy /source remote:dest --retries 10 --timeout 30s
      • Authentication Failures: Verify and reconnect:
        rclone config show
        rclone config reconnect remote:
      • Quota Exceeded Errors: Check space and limit transfers:
        rclone about remote:
        rclone copy /source remote:dest --drive-stop-on-upload-limit
      • ISP Throttling: Use smaller chunks:
        rclone copy /source remote:dest --transfers 4 --checkers 8 --drive-chunk-size 8M
    2. Debug issues:
      • Enable verbose logging: rclone copy /source remote:dest -vv --log-file=debug.log
      • Check connectivity: ping drive.google.com or nslookup drive.google.com
      • Isolate files: rclone copy /source remote:dest --max-size 100M
      • Compare directories: rclone check /source remote:dest
      • Clear cache: rclone rc cache/expire
    3. Optimize performance:
      • Adjust transfers: rclone copy /source remote:dest --transfers 8 --checkers 16 (stable connections) or --transfers 4 --checkers 8 (unstable)
      • Optimize chunks: rclone copy /source gdrive:dest --drive-chunk-size 32M
      • Use fast list: rclone copy /source remote:dest --fast-list
      • Enable multithreading: rclone copy /source remote:dest --multi-thread-streams 4
      • Schedule off-peak: Midnight to 5 AM IST
      • Select regional servers: rclone copy /source s3:bucket --s3-region ap-south-1
    4. Monitor logs and maintain configurations regularly

    Additional Reading


    Quick-Reference Command Chart

    Command Description Example
    rclone copy Copies files without deleting destination files rclone copy /local/path remote:path
    rclone sync Synchronizes files, deleting destination files not in source rclone sync /local/path remote:path
    rclone ls Lists files in a remote path rclone ls remote:path
    rclone lsd Lists directories in a remote path rclone lsd remote:
    rclone mount Mounts cloud storage as a local filesystem rclone mount remote:path /mount/point
    rclone about Displays storage usage information rclone about remote:

    Automation and Best Practices

    Rclone automation setup

    Automation is essential for Indian users managing cloud storage amidst variable internet reliability. Rclone’s scripting capabilities enable consistent, secure backups, reducing manual effort and ensuring data integrity, particularly when scheduled during off-peak hours like 2-4 AM IST.

    Practical Use Case Scenarios

    • Automate daily backups with robust scripts handling errors gracefully
    • Schedule operations during off-peak hours to leverage faster internet speeds
    • Implement secure backup strategies with encryption for sensitive data
    • Monitor operations with email notifications for success or failure

    Implementation Guide

    1. Create a backup script with error handling:
      #!/bin/bash
      # backup-script.sh
      PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
      LOG_FILE="/var/log/rclone-backup.log"
      EMAIL="your@email.com"
      
      timestamp() { date "+%Y-%m-%d %H:%M:%S"; }
      
      handle_error() {
          local exit_code=$1
          local error_msg=$2
          echo "$(timestamp) ERROR: $error_msg (Exit code: $exit_code)" >> $LOG_FILE
          echo "Backup failed with error: $error_msg" | mail -s "Backup Failed" $EMAIL
          exit $exit_code
      }
      
      echo "$(timestamp) Starting backup" >> $LOG_FILE
      
      if [ ! -d "/path/to/source" ]; then
          handle_error 1 "Source directory does not exist"
      fi
      
      rclone sync /path/to/source remote:/path/to/destination \
          --progress \
          --create-empty-src-dirs \
          --log-file=$LOG_FILE
      
      if [ $? -ne 0 ]; then
          handle_error 2 "Rclone sync failed"
      else
          echo "$(timestamp) Backup completed successfully" >> $LOG_FILE
          echo "Backup completed successfully at $(timestamp)" | mail -s "Backup Successful" $EMAIL
      fi
      
    2. Schedule rclone for backups with cron to avoid business hours (10 AM–7 PM IST):
      # Daily at 3:30 AM
      30 3 * * * /path/to/backup-script.sh
      # Weekly on Sunday at 2 AM
      0 2 * * 0 /path/to/full-backup.sh
      

      Prevent overlaps using a lock file:

      LOCK_FILE="/tmp/backup.lock"
      if [ -f "$LOCK_FILE" ]; then
          echo "Another backup is already running. Exiting."
          exit 1
      else
          touch $LOCK_FILE
          # Run backup commands
          rm -rf $LOCK_FILE
      fi
      
    3. Implement security measures:
      • Encrypt data:
        $ rclone copy /source cryptremote:/dest
      • Secure configuration:
        $ chmod 600 ~/.config/rclone/rclone.conf
      • Use service accounts:
        $ sudo useradd -m -s /bin/bash rclone-backup
      • Enable two-factor authentication for cloud accounts
      • Update Rclone regularly:
        $ curl https://rclone.org/install.sh | sudo bash
    4. Monitor logs for unauthorized access and restrict operations to specific IPs if feasible

  • How To Measure Linux System Resources

    In this post, we will look at a few Linux server monitoring tools that will help us determine which processes consume most system resources on Linux machine. These terminal based tools are atop, htop, and top . For the experienced hands, a terminal and “*top” command may be familiar.

    (more…)
  • Linux on Macbook Pro Retina and USB Boot for Raspberry Pi4

    Introduction

    In June and July 2021, I consolidated the data and upgraded the computers in the household. The data (images, Documents, audio and video files…)was spread across devices, external drives, and cloud storage.
    While the computers could support the native operating system (e.g. Mac OS for MacBook Pro) I decided to zero in on the operating systems that would keep them chugging along. This post covers the operating systems I tested during the process. The data consolidation will be covered in a separate post.
    [playht_player width=”100%” height=”90px” voice=”en-IN-Wavenet-B”]

    Hardware and Software Upgrades to Laptops

    I have three laptops and a Raspberry Pi that all got some updates or another.

    These include:

    • MacBook Pro Early 2015
    • MacBook Pro Late 2012
    • Coconics Enabler Laotop
    • Raspberry Pi 4 Model B- 4 GB

    specifications of MacBook Pro Retina Late 2012.Screenshot by Amar Vyas

    Specifications for Macbook Pro Retina, late 2012

    Installation of drivers for Broadcom Wifi Chip on Macbook Pro with Linux Mint.Screenshot by Amar Vyas

    Installation of Linux Mint on Macbook Pro

    Hardware and Software Upgrades

    In addition to the above computers, I also changed the battery and doubled the Ram for my wife’s computer (Dell Inspiron 3000). I did try to persuade her to use Linux, even replaced the stock SSD drive that had Windows 10 with NVME that had Ubuntu Mate! But that did not go down as intended. My post below will therefore cover the above four devices only.

    Hardware changes/ upgrades to computers

    Below I have summarised the changes I made to the computers as they were purchased or acquired:

    Computer Original Specs Modifications Operating System
    Raspberry Pi4 Model B See specifications Updates to Bootloader, Boot via SSD drive on USB Ubuntu Mate 20.04
    Coconics Enabler See OEM Specs Kingston 480 GB SSD + 128 GB MicroSD Card. Boot via SSD, Home folder is the eMMC drive Linux Mint 20.02 ‘Uma’, XFCE edition
    MacBook Pro Retina Late 2012 Quad core i5, 8 GB DDR3 1600 Change SSD to 512 GB Name (planned) MacOS Catalina
    MacBook Pro Retina Early 2015 Quad Core i5, 8 GB DDR3 RAM, 128 GB SSD 1 TB NVMe Solus OS Plasma Edition 4.2 (upgraded to 4.3)
    Dell Inspiron 5300 i7 processor/ 8 GB DDR4 RAM/ 256 GB SSD Drive New Battery, extra 8 GB DDR4 RAM Windows 10

    Disk speed test on eMMC drive for Coconics Enabler Laptop
    Disk speed test on eMMC drive for Coconics laptop

    bench.sh test on Coconics Enabler Laptop with Ubuntu Mate installed
    Bench.sh on Coconics laptop using Ubuntu Mate

    Screenshots from Installation

    Manjaro Budgie and XFCE

    The 2021 versions of Manjaro kept giving some strange errors- the operating system would install, ask for an upgrade, and then… Kernel Panic. Ironically I experienced this on the MBP2015 as well as Coconics. For i3, XFCE and Budgie versions of Manjaro. I had to reluctantly let that option go.

    Linux Mint

    Next on the list was Linux Mint. With the 20.01 version, I had some success- except that the Broadcom drivers for wifi became an issue.

    Disk speeds and partition structure
    Kernel Module Error
    Using Ocenaudio App
    Dark Mode for Mint Linux on MacBook Pro
    MBP15 Operating System Information
    Mint Driver Manager

    The Kernel Module error kept repeating, and I had to look for other options. Yes, most errors are fixable provided one is willing to put efforts. But I was looking to standardize the operating systems and the data/ folder structure across all devices, so I needed consistency.


    SolusOs Budgie

    Next on the list was SolusOs Budgie desktop.

    Screenshots from Installation and Desktop Setup
    New Installation of Budgie Desktop
    Installation of Manjaro Linux, 2021. Screenshot by Amar Vyas
    Installation of Budgie Desktop
    Installation of Manjaro Linux, 2021. Screenshot by Amar Vyas
    Completion of Installation
    Installation of Manjaro Linux, 2021. Screenshot by Amar Vyas
    Checks before installation
    Installation of Manjaro Linux, 2021. Screenshot by Amar Vyas
    Manjaro XFCE Installation*
    Installation of Manjaro Linux, 2021. Screenshot by Amar Vyas
    *In case you prefer it over Budgie

    Screenshots from Installation of Linux Mint

    2019 Edition ‘Tara’ 2021 Edition ‘Uma’
    Multiple windows open in Linux Mint Tara
    Installation of Manjaro Linux, 2021. Screenshot by Amar Vyas
    System settings for Linux Mint Uma Installation
    Installation of Manjaro Linux, 2021. Screenshot by Amar Vyas
    Default Desktop of Linux Mint Tara
    Installation of Manjaro Linux, 2021. Screenshot by Amar Vyas
    Hardware settings for test machine
    Installation of Linux Mint Tara, 2019. Screenshot by Amar Vyas
    Dist- Upgrade for Linux Mint Tara
    Installation of Manjaro Linux, 2021. Screenshot by Amar Vyas
    Updates during installation of Mint
    Installation of Linux Mint Uma, 2021. Screenshot by Amar Vyas

    And for good measure, let us look at Linux Mint Uma- XFCE edition

    Disk Parition Scheme for Linux Mint
    Installation of Linux Mint Uma, 2021. XFCE Edition. Screenshot by Amar Vyas

    SolusOs – KDE Plasma Edition

    Finally, we take a look at Solus Plasma Edition

    KDE Plasma Installer for SolusOs
    Installation of SolusOs Plasma Edition, 2021. Screenshot by Amar Vyas
    Installation of Solus OS
    Installation of Solus Plasma Edition, 2021. Screenshot by Amar Vyas
    Installation of Solus OS
    High RAM usage in Solus Budgie desktop, 2021. Screenshot by Amar Vyas
    Solus Plasma- Install Complete
    High RAM usage in Solus Budgie desktop, 2021. Screenshot by Amar Vyas
    Ram Usage for Solus Budgie
    High RAM usage in Solus Budgie desktop, 2021. Screenshot by Amar Vyas
    Free up Disk space using Bleachbit*
    High RAM usage in Solus Budgie desktop, 2021. Screenshot by Amar Vyas
    *Handle with extreme care, read up the risks before using Bleachbit
    System Upgrade for Solus Plasma Edition – 2
    High RAM usage in Solus Budgie desktop, 2021. Screenshot by Amar Vyas

    Why didn’t I opt for the Budgie Desktop?

    Solus is known for the Budgie desktop -they created it after all. But in my installation of Solus with Budgie desktop, I experienced very high RAM usage. Below is the usage when the desktop had just loaded.

    High RAM usage in Solus Budgie Desktop
    On both Coconics and MacBook Pro15, I experienced very high RAM usage while using web browsers. This was a result from a bug in one of the GNOME libraries that is apparently still open.

    RAM usage on MacBook Pro 15, Solus Budgie Desktop

    RAM usage on MBP15 running Solus Budgie. Screenshot by Amar Vyas

    RAM usage on Coconics Laptop, Brave browser

    memory footprint for brave browser on Coconics laptop.Screenshot by Amar Vyas

    The other issue I encountered on the Coconics laptop was high CPU temperatures and disk temperatures. Below is a screenshot from Ubuntu Mate 21.04 installation. The below image shows temperature from 5 minutes after installation. The laptop went into forced shutdown mode twice because the ‘safety’ temperature of 100 Deg Celsius was reached. I removed Mate and installed Linux Mint XFCE.

    heating issue on Ubuntu Mate Installation.Screenshot by Amar Vyas

    CPU and disk temperature was a problem with MacBook Pro retina 2015 as well.

    cpu and disk temperature for MacBook Pro Retina 2015 using Linux.Screenshot by Amar Vyas

    Wrapping it up

    The option (and ability) to boot RaspberryPi4 is indeed a blessing! I was able to follow the instructions listed here and here, and the process was seamless. My RaspberryPi Rb / 4 GB device runs Ubuntu Mate with aplomb. I had of course tried installing Manjaro XFCE – my preferred linux distro. Alas! That was not to be.

    Manjaro XFCe on Raspberry Pi4. Screenshot by Amar Vyas

    RAM usage while running Firefox on RaspBerryPi4. Screenshot by Amar Vyas

    Speedtest result for Internet speed using RaspBerryPi4. Screenshot by Amar Vyas

    Creating boot disk for RaspberryPi4 using Raspberry PI Manager. Screenshot by Amar Vyas

    Same issue; High RAM usage with Firefox

    RAM usage when Firefox browser is running. Screenshot by Amar Vyas

    Reflection

    The high RAM usage while using browser, in particular Firefox, makes me wonder if the extensions for browser are the culprit. Moreover, I use Firefox sync so that all browsers have identical setup. I did run a test with all extensions disabled, but the results was not much different. Solving that issue will be a problem for another day.