Vue normale

Reçu avant avant-hier

Prepare Google Drive for Koha backup

Par :Vimal
16 septembre 2023 à 10:02
Everybody is familiar with using Google Drive. Google Drive is the cloud storage service of Google Inc. Currently, 15 GB of free storage is available with a Google account. Koha users can make use of Google Drive storage to keep database backups. GNOME desktop facilitates synchronising online accounts like Google, Nextcloud, Facebook, Microsoft, Flickr, etc. 

Here are the steps to prepare the Koha system to store the database in Google Drive.

Installation of GNOME desktop

If the system running on desktops other than GNOME, install it. I prefer the GNOME Flashback edition for a minimal and lightweight experience. GNOME Flashback desktop can be installed on the default Ubuntu and Debian desktop. Here is the command to install GNOME Flashback on all Ubuntu variants;

sudo apt update
sudo apt install gnome-session-flashback

Command to install GNOME Flashback on Debian.

sudo apt update
sudo apt install gnome-flashback

Sign out from the current session and change the desktop to GNOME Flashback.


Prepare the system to sync Google Drive

Open the settings, Applications > System Tools > Preferences > Settings 

Select the Online accounts.

Select Google and sign in.

After the successful sign-in, the Google account is visible in the File Manager. Files and folders load into the File Manager when you click on it.




Enter inside the My Drive folder and see the files and folders. Create a folder for Koha's backup. Enter inside the folder for Koha backup and copy the folder's location. It's necessary to direct the database backup to the backup destination.

Copy the folder location and keep it in a file for later use.

The location looks like this, 
google-drive://mygmailaccount@gmail.com/0AHFZ9iUzgfcmUk9PVA/14MJDZzaMNVnosHsOj7r-Xi6bUOHn344e

Scheduling of the backup process

Here is a shell script to schedule the backup with a time stamp. It keeps three days of backup and deletes previous files to save space. Follow the instructions to schedule the backup.

Download the shell script

Copy the shell script to the home folder. Open the shell script and make changes to the Koha database, username, password and location of the backup. The timestamp of the database also appears on the backup file name. Give the number of days the backup keeps.

Move the shell script to /usr/local/bin

sudo cp backup.sh /usr/local/bin

Give the necessary permission to the shell script,

cd /usr/local/bin
sudo chmod +x backup.sh
sudo chown "$USER:$USER" backup.sh
chmod 700 backup.sh
Create the cronjob entry of the backup. Apply the following command on the terminal.

export EDITOR=mousepad
crontab -e

Copy the below lines to the bottom part of the crontab file.

#Koha backup
10 20 * * * /usr/local/bin/backup.sh

Change the timing of the backup. Here, backup takes at 8:10 PM. Watch the backed-up files appear in the folder.

pCloud for Koha backup

Par :Vimal
5 juillet 2023 à 19:17

pCloud is a cloud storage service that offers a secure and convenient way to store, share, and access your files from anywhere. It works like Dropbox cloud storage. Dropbox gives only 2 GB of free storage only. pCloud provides a variety of pricing plans, starting with a free plan that gives you 10 GB of storage. Koha users can make use pCloud for backup storage. Schedule the backup and point to the PCloud storage is very convenient.

Installation of PCloud drive in Debian/Ubuntu.

Here are the steps on how to install PCloud software in Ubuntu:

1. Go to the pCloud website, and create an account.

2. Download the pCloud AppImage file for Linux.

3. Save the file to your computer.

4. Open a terminal window and navigate to the directory where you saved the file.

5. Run the following command to give the file executable permissions:

sudo chmod +x pcloud

Either double-click on the PCloud icon or run the following command to start the pCloud AppImage:

./pcloud

6. The pCloud login window will appear. Enter your pCloud email address and password, and click Log in.

A folder named pCloudDrive will be created in your home directory. This is your pCloud virtual drive. You can now start storing and accessing your files in pCloud.

To schedule Koha backup to pCloud please visit the following link,

http://kohageek.blogspot.com/2021/08/backup-with-auto-delete-old-files.html

The blog post gives the details of schedule backup in Dropbox cloud storage. The same steps can follow to schedule Koha backup to pCloud.

Backup with auto delete old files

Par :Vimal
26 août 2021 à 03:50


Auto-deletion of old backup files helps save cloud space.

Here is a shell script to schedule the backup with a time stamp. It keeps three days of backup and deletes previous files to save space. This method is convenient for working with cloud storage with limited space (e.g. Dropbox). 
Follow the instructions below to schedule the backup.

Download the shell script

Copy the shell script to the home folder. Open the shell script and make changes to the Koha database, username, password and location of the backup. The timestamp of the database also appears on the backup file name. Give the number of days the backup keeps.

Move the shell script to /usr/local/bin

sudo cp backup.sh /usr/local/bin

Give the necessary permission to the shell script,

cd /usr/local/bin
sudo chmod +x backup.sh
sudo chown "$USER:$USER" backup.sh
sudo chmod 700 backup.sh

Create the cron job entry for the backup. Apply the following command on the terminal.

export EDITOR=mousepad
crontab -e

Copy the lines below to the bottom part of the crontab file.

#Koha backup
10 20 * * * /usr/local/bin/backup.sh

Change the timing of the backup. Here, backup takes at 8:10 PM.

Choose SSD over HDD for Koha installation

Par :Vimal
2 août 2020 à 09:41
Image courtesy: techyukti.com

Fast storage is the buzz word in the computer storage industry. We are familiar with HDD (Hard Disk Drive) with all types of computer devices. HDD has a moving read/write head to access data from storage same like a gramophone player and slower to read and write. Unlike HDD, SSD (Solid State Drive) has no moving parts, and it obtains data from storage instantly. SSD can give fast performance than traditional magnetic-based computer storage devices. "A standard SSD can read sequential data at a speed of about 550 megabytes per second (MBps) and write it at 520 MBps" (Paul Rubens). As it is a fast storage SSD consumes only less power and give long battery life for laptop computers. 

Let's check the pricing of SSD. Price of SSD storage is a little bit higher than HDD. Western Digital SATA 1 TB Desktop Internal Hard Disk cost Rs. 3700. Crucial MX500 1 TB Laptop, Desktop Internal Solid State Drive cost Rs. 10647. The price of SSD is dropping down. SSDs for computers are available in 120 GB to 4 GB capacities. Anyway, we can consider small capacity SSD (120 / 240 GB) for desktops and laptops. Visit any online shopping sites to check the pricing of SSD with various capacities.

Majority of Koha installations running on desktop computers with traditional HDD. Libraries can improve the performance of Koha using SSD storage. Koha installation consumes only small storage, 120 /240 GB SSD is enough for libraries with a small collection. The price of 120 GB SSD cost around Rs. 2300, and 240 GB cost only Rs. 3200 only. Koha users with HDD can replace to SSD. Take back of the database and everything. Need to install Koha fresh into SSD after storage upgrade. Libraries going for new Koha installation can specify SSD storage in the purchase order.

References
SSD vs HDD Speed
SSD vs HDD: Which Is Best for You?
SSD vs HDD: What's the Difference?

❌