{"id":32951,"date":"2019-08-02T14:53:59","date_gmt":"2019-08-02T10:53:59","guid":{"rendered":"https:\/\/www.msp360.com\/resources\/?page_id=32951"},"modified":"2025-11-21T14:00:39","modified_gmt":"2025-11-21T10:00:39","slug":"msp360-snapshot-driver-for-linux-0-16-beta","status":"publish","type":"page","link":"https:\/\/www.msp360.com\/resources\/documentation\/cli-api\/msp360-snapshot-driver-for-linux-0-16-beta\/","title":{"rendered":"CloudBerry Snapshot Driver for Linux 0.16 Beta"},"content":{"rendered":"<p>When backing up a file that is being written, it is impossible to guarantee the integrity of a backup copy of that file. This is typical for backing up documents that are actively being edited, etc. To handle these scenarios, Microsoft Windows uses the Volume Shadow Copy Service (VSS) technology that lets users make backup copies of files or volumes, even when they are in use.<\/p>\n<p><!--more-->VSS first creates a snapshot of the volume to back up. A snapshot (or shadow copy) is a read-only point-in-time replica of an original volume that has been taken directly before an application accessed the volume files. Therefore, this technology can maintain a consistent state of a file or volume.<\/p>\n<p>Linux does not provide similar technology, so we have developed our own snapshot technology called CloudBerry Snapshot Driver for Linux. Our technology includes two parts: the snapshot device and the snapshot driver. The snapshot device is a mirror of the selected disk partition. If an application tries to modify a file that belongs to the selected disk partition, the snapshot driver automatically copies the parts of the file being read to the snapshot device. The application can then overwrite the data on the disk, while the snapshot device contains the original data. Thus, the snapshot device contains the state of all original files as they were when the snapshot was created.<\/p>\n<h2>Key Benefits<\/h2>\n<p>\u2022 Supports consistent backups of files that are being written during the backup operation<br \/>\n\u2022 Allows applications to continue to access and change files without affecting the backup<br \/>\n\u2022 Easy setup<br \/>\n\u2022 Supports several snapshot devices at a time to create shadow copies of several disk partitions simultaneously<\/p>\n<h2>System Requirements<\/h2>\n<p>Before installing CloudBerry Snapshot driver for Linux, ensure that your computer meets the following minimum software and hardware requirements.<\/p>\n<h3>Hardware Requirements<\/h3>\n<p>\u2022 1.4 GHz 64-bit processor<br \/>\n\u2022 512 MB RAM<br \/>\n\u2022 Minimum free disk space depends on a number of snapshot devices and their sizes<\/p>\n<h3>Software Requirements<\/h3>\n<p>\u2022 CentOS 6.10\/7.6<br \/>\n\u2022 Debian 9.2.1\/9.8<br \/>\n\u2022 Fedora 29<br \/>\n\u2022 OpenSUSE 15.0<br \/>\n\u2022 Ubuntu 16\/17\/18<\/p>\n<h2>Getting Started<\/h2>\n<h3>Deployment Instructions<\/h3>\n<p>To deploy CloudBerry Snapshot driver, perform the following steps:<\/p>\n<p>1. Download the driver installer archive from our website, and then unpack it<\/p>\n<blockquote><p>NOTE: By default, the system prompts you to unpack the driver installer archive to the<br \/>\n<em>CLBB_driver<\/em> folder. After unpacking the archive, this folder has the following<br \/>\nstructure:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32954\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/1.png\" alt=\"\" width=\"872\" height=\"194\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/1.png 872w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/1-300x67.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/1-768x171.png 768w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/1-624x139.png 624w\" sizes=\"auto, (max-width: 872px) 100vw, 872px\" \/><\/p><\/blockquote>\n<p>2. Build the snapshot driver<br \/>\n3. Create the snapshot device.<br \/>\n4. Start and mount the newly created snapshot device.<br \/>\n5. Optionally, perform steps to check whether the snapshot driver works properly.<br \/>\nThe section that follows details the deployment procedure steps.<\/p>\n<h2>Detailed Steps<\/h2>\n<h3>Building the Snapshot Driver<\/h3>\n<p>To build the snapshot driver, navigate to the <em>CLBB_driver<\/em> folder, and at the command<br \/>\nprompt, enter the following commands:<\/p>\n<p><code>sudo .\/install make<\/code><\/p>\n<p>When prompted, enter the root password, and type in Y (Yes) to proceed with the installation process:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32956\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/2.png\" alt=\"\" width=\"1253\" height=\"255\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/2.png 1253w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/2-300x61.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/2-768x156.png 768w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/2-1024x208.png 1024w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/2-1200x244.png 1200w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/2-624x127.png 624w\" sizes=\"auto, (max-width: 1253px) 100vw, 1253px\" \/><br \/>\n<code>sudo .\/install install<\/code><\/p>\n<h3>Installing the Snapshot Driver<\/h3>\n<p>Some of the installation commands use the current kernel name that you can get using the following command:<br \/>\n<code>uname \u2013r<\/code><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32957\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/3.png\" alt=\"\" width=\"676\" height=\"106\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/3.png 676w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/3-300x47.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/08\/3-624x98.png 624w\" sizes=\"auto, (max-width: 676px) 100vw, 676px\" \/><\/p>\n<p>Please, note the kernel name, such as <em>4.12.14-lp150.245-default<\/em> in this scenario.<\/p>\n<p>To install the snapshot driver, at the command prompt, enter the following command:<\/p>\n<p><code>sudo insmod<br \/>\n\/lib\/modules\/&lt;CURRENT_KERNEL&gt;\/kernel\/drivers\/block\/cblb_modul e.ko total=&lt;N&gt;<\/code><\/p>\n<p>where <em>&lt;CURRENT_KERNEL&gt;<\/em> refers to the current kernel name, and <em>&lt;N&gt;<\/em> is the maximum number of the snapshot devices that can be created at a time.<\/p>\n<blockquote><p>NOTE: By default, N is equal to 4. An increase of N results in decreasing the driver performance.<\/p><\/blockquote>\n<p>Example: Install the Snapshot Driver<\/p>\n<p>The following command installs the snapshot driver for the <em>4.12.14-lp150.245- default<\/em> kernel; maximum number of the snapshot devices is 4:<\/p>\n<p><code>sudo insmod \/lib\/modules\/4.12.14-lp150.245-<br \/>\ndefault\/kernel\/drivers\/block\/cblb_module.ko<\/code><\/p>\n<h3>Creating the Snapshot Device<\/h3>\n<p>To create the snapshot device, use the following commands:<\/p>\n<p><code>sudo sync &amp;&amp; echo -n \"create&lt;device name&gt;&lt;partition name&gt;\u00a0 begin end\"&gt; \/sys\/kernel\/cblb\/cmd<\/code><\/p>\n<p>where <em>&lt;device name&gt;<\/em>\u00a0 is the device name that is being created, and the <em>&lt;partition name&gt;<\/em> is the name of the disk partition for which you create a snapshot. The \u201cbegin\u201d and \u201cend\u201d parameters mean that you want to create a snapshot for the whole disk partition.<\/p>\n<p><strong>Example: Create Snapshot Device<\/strong><\/p>\n<p>To clarify, consider the following sample command:<\/p>\n<p><code>sudo sync &amp;&amp; echo -n \"create shadow-sda2 \/dev\/sda2 begin end\"&gt; \/sys\/kernel\/cblb\/cmd<\/code><\/p>\n<blockquote><p>NOTE: This command creates the <em>shadow-sda2<\/em> snapshot device for the <em>\/dev\/sda2<\/em> disk partition.<\/p><\/blockquote>\n<h3>Starting and Mounting the Snapshot Device<\/h3>\n<p>To complete deploying the snapshot device, start and mount the newly created device.<\/p>\n<blockquote><p>NOTE: The snapshot driver stores temporary data to a file catalog you should create.<\/p><\/blockquote>\n<p><span style=\"text-decoration: underline;\">Create a catalog for storing temporary files:<\/span><\/p>\n<p><code>mkdir &lt;path to catalog&gt;<\/code><\/p>\n<blockquote><p>NOTE: Create a separate catalog for each snapshot device.<\/p><\/blockquote>\n<p><span style=\"text-decoration: underline;\">Start the snapshot device:<\/span><\/p>\n<p><code>echo -n \"start &lt;device name&gt;&lt;path to catalog&gt;&lt;file size&gt;&lt;max number of files&gt;\" &gt; \/sys\/kernel\/cblb\/cmd<\/code><\/p>\n<p>where\u00a0<em>&lt;device name&gt;<\/em> is the created snapshot device name;<em>&lt;path to catalog&gt;<\/em> is the path to the catalog for temporary files;<em>&lt;file size&gt;<\/em> is the temporary file size (in blocks, such as 512, 2024, 4048, etc.), and\u00a0<em>&lt;max number of files&gt;<\/em> is the maximum number of created temporary files.<\/p>\n<p><strong>Example: Start Snapshot Device<\/strong><\/p>\n<p><code>mkdir \/tmp\/shadow-sda2<br \/>\necho -n \"start shadow-sda2 \/tmp\/shadow-sda2409600 20\" &gt;<br \/>\n\/sys\/kernel\/cblb\/cmd<\/code><\/p>\n<blockquote><p>NOTE: These commands start the <em>shadow-sda2<\/em> device that uses the <em>\/tmp\/shadow-sda2<\/em> catalog for storing temporary files. The size of temporary files is 409600 blocks, and<br \/>\nthe maximum number of files is 20.<\/p><\/blockquote>\n<p><span style=\"text-decoration: underline;\">Create a catalog for mounting the snapshot device:<\/span><\/p>\n<p><code>mkdir&lt;path to catalog&gt;<\/code><\/p>\n<p><span style=\"text-decoration: underline;\">Mount the snapshot device:<\/span><\/p>\n<p><code>sudo mount -o ro,noload \/dev\/&lt;device name&gt;&lt;path to catalog for mounting the snapshot device&gt;<\/code><\/p>\n<p><strong>Example: Mounting Snapshot Device<\/strong><\/p>\n<p>Consider the following sample commands that mount the <em>shadow-sda2<\/em> snapshot device<br \/>\nto the <em>\/tmp\/mshadow-sda2<\/em> catalog:<\/p>\n<p><code>mkdir \/tmp\/mshadow-sda2<br \/>\nsudo mount -o ro,noload \/dev\/shadow-sda2 \/tmp\/mshadow-sda2<\/code><\/p>\n<h3>Validating Driver Installation<\/h3>\n<p>To ensure that you have properly installed the snapshot driver, consult the following<br \/>\nchecklist:<\/p>\n<ul>\n<li>The <em>\/tmp\/mshadow-sda2<\/em> catalog contains a copy of the <em>\/dev\/sda2<\/em> disk partition.<\/li>\n<li>The file system <em>\/sys<\/em> includes the <em>\/sys\/kernel\/cblb<\/em> catalog that contains the <em>cmd<\/em><br \/>\nand <em>debug<\/em> files, and sub-catalogs for each created snapshot device:<\/li>\n<\/ul>\n<h3>Removing Snapshot Device<\/h3>\n<p>To remove the snapshot device:<\/p>\n<p>1. Unmount the snapshot device:<\/p>\n<p><code>umount &lt;device name&gt;<\/code><\/p>\n<p>2. Remove the snapshot device:<\/p>\n<p><code>echo \u2013n \u201cremove &lt;device name&gt;\u201d &gt; \/sys\/kernel\/cblb\/cmd<\/code><\/p>\n<h2>Additional Resources<\/h2>\n<p>You can get the latest information on our products, various tutorials, and other<br \/>\npertinent information in our blog and at our Help Center.<\/p>\n<p>Also, check out our knowledge base that features various workarounds for frequently<br \/>\nexperienced issues as well as some tips on how to enhance your interaction with our<br \/>\nflagship backup solution at <a href=\"http:\/\/kb.msp360.com\">our knowledge base<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When backing up a file that is being written, it is impossible to guarantee the integrity of a backup copy of that file. This is typical for backing up documents that are actively being edited, etc. To handle these scenarios, Microsoft Windows uses the Volume Shadow Copy Service (VSS) technology that lets users make backup [&hellip;]<\/p>\n","protected":false},"author":46,"featured_media":0,"parent":25713,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-template-cli.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-32951","page","type-page","status-publish","hentry","types-cli"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/pages\/32951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/comments?post=32951"}],"version-history":[{"count":1,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/pages\/32951\/revisions"}],"predecessor-version":[{"id":61439,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/pages\/32951\/revisions\/61439"}],"up":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/pages\/25713"}],"wp:attachment":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/media?parent=32951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}