User Tools

Site Tools


manuals:vps:datasets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
manuals:vps:datasets [2016/12/12 14:19] – [Automated Backup Downloads] fix typo Aithermanuals:vps:datasets [2017/01/12 14:36] – Snapshot deletion Aither
Line 1: Line 1:
 ====== Datasets ====== ====== Datasets ======
 +
 +Dataset is a term from the ZFS filesystem that we're using everywhere. You can imagine it as
 +a formatted partition on disk containg directories and files. For example, btrfs has
 +a similar concept called //subvolumes//.
  
 The dataset in vpsAdmin directly represents the ZFS dataset on the hard drive. Datasets The dataset in vpsAdmin directly represents the ZFS dataset on the hard drive. Datasets
-are used for VPS and NAS data. The concept of a dataset replaces NAS +are used for VPS (each VPS has its own dataset) and NAS data. A VPS dataset can be used 
-exports. A VPS dataset can be used the same way as an NAS.+the same way as an NAS, but are located in different locations (VPS details and the NAS menu). 
 +The operations you can carry out with them are the same, such as creating snapshots, restoring 
 +to snapshots or mounting datasets to VPS.
  
 {{:navody:vps:dataset_vps.png?300|}} {{:navody:vps:dataset_vps.png?300|}}
Line 10: Line 16:
 quotas and ZFS properties for various data/apps. quotas and ZFS properties for various data/apps.
  
-VPS datasets are located in the VPS details and NAS datasets are in the NAS menu. +VpsAdmin allows users to create subdatasets and configure ZFS properties.
-The operations you can carry out with them are the same. VpsAdmin enables +
-creating subdatasets and configuring ZFS properties.+
  
 {{:navody:vps:dataset.png?300|}} {{:navody:vps:dataset.png?300|}}
Line 53: Line 57:
 ===== Snapshots ===== ===== Snapshots =====
  
-Backups are made using ZFS snapshotswhich can be seen in the Backups +Snapshot captures the state of the dataset and all data in it at the time of its creation. 
-menuThey can be created in the very same menu. The created VPS snapshots cannot be +If the data are later changedyou can still access the data as it was when the snapshot 
-deleted, you have to wait until they are automatically overwritten by further daily backups+was createdYou can [[#mounts|read]] data from snapshots or restore dataset to a snapshot, 
 +but that will delete all data changed or added since the snapshot was created. 
 + 
 +Snapshots can be seen and created in the Backups menu.
  
 {{:navody:vps:backups.png?300|}} {{:navody:vps:backups.png?300|}}
  
-VPS backups are made every day at 1:00 AM, when one node+VPS backups are made every day at 1:00 AM, when each node
 creates a snapshot of all the datasets at once. Then the snapshots are moved to creates a snapshot of all the datasets at once. Then the snapshots are moved to
-backuper.prg.+backuper.prg. Snapshots are kept for 14 days, older snapshot are deleted. In addition 
 +to these daily snapshots, you can create 6 extra snapshots. 
 +The created snapshots cannot be 
 +deleted, you have to wait until they are automatically deleted by daily backups
  
-Attention! NAS **is not backed up** to backuper.prg. Snapshots are+Beware! NAS **is not backed up** to backuper.prg. Snapshots are
 local only and their only purpose is protection against the damage or unwanted deletion of data. local only and their only purpose is protection against the damage or unwanted deletion of data.
 +
 +==== Snapshot deletion ====
 +Only NAS snapshots can be deleted and only using the [[manuals:vps:api|API]].
 +It is not implemented yet in the web interface ([[https://redmine.vpsfree.cz/issues/115|issue #115]]).
 +
 +Snapshots are deleted using action [[https://api.vpsfree.cz/v3.1/#root-dataset-snapshot-delete|Dataset.Snapshot#Delete]].
 +You can either use [https://webui.haveapi.org/master/|haveapi-webui]], [[manuals:vps:api#cli|CLI]],
 +nor any other client.
 +
 +For example, using CLI it looks like this:
 +
 +<code bash>
 +# List all datasets on NAS
 +$ vpsfreectl dataset list -oid,name,environment -- --role primary
 +   Id  Name            Environment        
 + 2179  1754            Praha storage (#3) 
 + 2710  1754/backup     Praha storage (#3)
 +
 +# List snapshots of the chosen dataset
 +$ vpsfreectl dataset.snapshot list 2179 --columns
 +     Id  Dataset        Name                  Created_at                   History_id  Mount 
 + 692649  1754 (#2179)   2017-01-12T14:26:40   2017-01-12 15:26:40 +0100              -
 +
 +# Delete the snapshot using dataset and snapshot id
 +$ vpsfreectl dataset.snapshot delete 2179 692649
 +</code>
  
 ===== Mounts ===== ===== Mounts =====
Line 79: Line 115:
  
 I do not recommend nesting mount points in the incorrect order. The situation when I do not recommend nesting mount points in the incorrect order. The situation when
-one/two” dataset is mounted above the one” dataset has not been solved.+''one/two'' dataset is mounted above the ''one'' dataset has not been solved.
  
 {{:navody:vps:mounts_detail.png?300|}} {{:navody:vps:mounts_detail.png?300|}}
Line 91: Line 127:
 always works on the dataset level. If a VPS has subdatasets, rootfs is restored always works on the dataset level. If a VPS has subdatasets, rootfs is restored
 from the backup, subdatasets are not restored. I.e. it is possible to restore from the backup, subdatasets are not restored. I.e. it is possible to restore
-any dataset and this doesn’t have any effect on other datasets. During the restore process, +any dataset and this doesn’t have any effect on other datasets.
-all snapshots are stored thanks to the fact that backups in the backuper are branched.+
  
 You can only make snapshots of an NAS **manually**. Since it is not backed up to the You can only make snapshots of an NAS **manually**. Since it is not backed up to the
manuals/vps/datasets.txt · Last modified: 2023/08/02 18:22 by Aither