Transferring files and screenshots

iBatyr Monitor separately stores metadata (databases) and captured files. For large amounts of data, this allows you to store databases and files on different hard drives. For example, keep databases on fast SSD drives, and files on a separate large raid array or network storage.

Illustration 1 — Transferring files and screenshots

Note

Below are instructions for working with disk sdb1. The name of your hard drive may be different.

raid-arrays and NAS-arrays are mounted in the same way.

To transfer files and screenshots:

  1. Stop services

sudo service ibatyr stop
sudo service postgresql stop
sudo service nginx stop
  1. Mount the new drive

If your drive is not yet formatted, then use the instructions for creating and adding sections.

sudo mount /dev/sdb1 /mnt

Attention

You cannot use the same mount point for files and databases. The database should not be stored in /var/lib/ibatyr/upload/.

  1. Move the contents of the folder

Move /var/lib/ibatyr/upload to the new drive.

sudo mv /var/lib/ibatyr/upload/* /mnt
  1. Unmount the drive

sudo umount /mnt
  1. Open the file /etc/fstab

sudo nano -u /etc/fstab
  1. Add a new disk - new line in the open file /etc/fstab:

/dev/sdb1 /var/lib/ibatyr/upload ext4  rw,noatime  0 2

For more information about mounting disks, see read in the article.

Check the installation is correct:

sudo mount -a
  1. Grant access rights:

sudo chown -R ibatyr:ibatyr /var/lib/ibatyr/upload
sudo chmod -R 755 /var/lib/ibatyr/upload
  1. Start services

sudo service postgresql start
sudo service ibatyr start
sudo service nginx start