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.
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:
Stop services
sudo service ibatyr stop
sudo service postgresql stop
sudo service nginx stop
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/.
Move the contents of the folder
Move /var/lib/ibatyr/upload to the new drive.
sudo mv /var/lib/ibatyr/upload/* /mnt
Unmount the drive
sudo umount /mnt
Open the file /etc/fstab
sudo nano -u /etc/fstab
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
Grant access rights:
sudo chown -R ibatyr:ibatyr /var/lib/ibatyr/upload
sudo chmod -R 755 /var/lib/ibatyr/upload
Start services
sudo service postgresql start
sudo service ibatyr start
sudo service nginx start