How to create, schedule, and clone Rockstor snapshots

Jack Wallen shows you how to work with Rockstor snapshots, so you can always have a working copy of your share data available.

Image: Jack Wallen

Rockstor is a perfect platform for any SMB looking to host their own internal cloud and NAS solution. Rockstor can serve as a personal or SMB cloud server, a traditional NAS server, or a customized in-house solution, with the help of numerous add-ons.

One of the many benefits of using Rockstor is the built-in snapshot feature. Consider this: Your Rockstor has been working as a cloud or NAS solution for some time and, out of nowhere, something happens to bring the server crashing down. Or, what if a specific directory of data winds up corrupt? What do you do? Have you backed up the stored data? If not, you could be out of luck. Or maybe, you need to create a new share from a snapshot. Fortunately, Rockstor's snapshot feature is there to save the day.

Snapshots are point in time representations for your Rockstor shares. They can be created and deleted instantly, take up very little space, and can be created as read-only or read-write. Thanks to snapshots, a share can be rolled back in time, and snapshots can even be cloned to create a brand new shares.

I want to show you how to manually create a new share snapshot, schedule the automatic creation of snapshots, and clone a snapshot to create a brand new share. I'll be working with Rockstor 3.9.1-0 installed as an antlet on an Antsle device. I will assume you already have Rockstor up and running, and have shares ready for snapshotting.

Creating a manual snapshot

Log into your Rockstor installation with an admin account. From the top menu, click Storage | Snapshots. In the resulting window (Figure A), click on the Create button in the upper right corner.

Figure A

Figure A

Manually creating a snapshot.

In the resulting window (Figure B), give the snapshot a name, select the share to be used, select if the snapshot is to be writable and visible to users, and click Submit.

Figure B

Figure B

Configuring the manual snapshot.

That's all there is to creating a manual snapshot of a Rockstor share.

Creating a scheduled snapshot

For those looking to create regular snapshots of a store (which you should), Rockstor has included that feature. To create a scheduled snapshot, go back to the main Rockstor window and click Storage | Snapshots. In the Snapshots window, click Schedule. If you've not created any scheduled snapshots--which you haven't yet--you'll then need to click the Schedule a Task button. In the task schedule window (Figure C), you'll need to configure the snapshot.

Figure C

Figure C

Creating a scheduled task for a regular snapshot.

Give the task a name. From the Task type drop-down, select Btrfs Snapshot. From the Share drop-down, select the share to be used for the snapshot. In the Snapshot prefix section, you can configure a prefix added to the name of the snapshot (in the format prefix_YYYMMDDHHMM). For the Maximum count section, set a number of snapshots to be retained. Set the permissions for the snapshot and then set the frequency of the task. Once you've set all of that, click Submit.

Your scheduled task is done and will execute at the configured time.

Cloning a share by way of snapshots

Let's say you want to clone a share. This is done by way of snapshots. Rockstor has made this process simple as well. To do this, go back to Storage | Snapshots. Locate the snapshot you want to clone and then click the Clone snapshot button (Figure D).

Figure D

Figure D

Cloning a snapshot.

You'll be prompted to give the cloned share a name. Once you've given it a unique name, click the Submit button and the newly cloned share will be available. This clone will have the same settings as the snapshot it was based on. If you want to edit those settings, you can go into the newly created share, click on the Access Control tab (Figure E), and make the necessary changes.

Figure E

Figure E

Altering access controls for our newly cloned share.

Snapshots made easy

And that's all there is to managing snapshots with Rockstor. Rockstor has done a remarkable job of making snapshotting your shares incredibly easy. With a solid snapshot schedule, you will always have a working copy of your data available.

Also See