translator
1,001
edits
m (tippfehler) |
(added warning) |
||
Line 113: | Line 113: | ||
A snapshot is read-only. Therefore it is guaranteed not to change. In a snapshot you will find all files of the subvolume frozen in time. {{BoxWarning|Where to place snapshots|When creating snapshots you have to watch out for the volume layout in use}} | A snapshot is read-only. Therefore it is guaranteed not to change. In a snapshot you will find all files of the subvolume frozen in time. {{BoxWarning|Where to place snapshots|When creating snapshots you have to watch out for the volume layout in use}} | ||
Taking a snapshot is '''very fast''', and '''nearly priceless'''. After the snapshot is taken, all future writes will go as in CoW usual. But none of the space occupied by files in the snapshot will be reusable. As you write more and more new files the filesystem will grow because it can not reuse the files in the snapshot. A new snapshot will freeze | Taking a snapshot is '''very fast''', and '''nearly priceless'''. After the snapshot is taken, all future writes will go as in CoW usual. But none of the space occupied by files in the snapshot will be reusable. As you write more and more new files the filesystem will grow because it can not reuse the files in the snapshot. A new snapshot will freeze additionaly all created or modified files since the last snapshot and so on. '''If you don´t release'''(delete) any snapshot '''you will''' eventually '''run out of space''' soon(disk full) | ||
Deleting a snapshot does not delete any files that are actually in use by other snapshots or the subvolume they where taken from. | Deleting a snapshot does not delete any files that are actually in use by other snapshots or the subvolume they where taken from. To free some space, Btrfs has to test for every file in the snapshot, whether it is in use, or it is not. If it is not, the space of this file/version will be freed.(This is greatly simplified) Therefore it is '''costly to remove snapshots'''. And Btrfs will do this work in the background. You may notice this, because when you delete a snapshot there will be '''no immediate gain in freed space'''. After a while you will notice that some space was freed. | ||
Snapshots (if regularly made) may be used for: | Snapshots (if regularly made) may be used for: | ||
* | * Comparing config files from different "times" | ||
* | * Merging config files | ||
* | * Recovering accidentally deleted/overwritten files | ||
* system | * Rollback your system | ||
* | * Anchor for a backup with send/receive | ||
* | * Basis for a seed | ||
* '' | * ''What do you use snapshots for ?'' | ||
Don´t forget to remove snapshots, or you will get in '''"out of space" -trouble soon'''. Btrfs needs some free space to manage its work. If your volume is more then 90% full you have to think(fast) what to do. | |||
* ++++ '''Add''' some partition/device to the volume | |||
* +++ '''Remove''' some snapshots you don't need | |||
* + '''Delete''' some files (this does only help if they are not part of any snapshot) | |||
Making and deleting snapshots is best done automatically: | Making and deleting snapshots is best done automatically: | ||
Line 135: | Line 140: | ||
* Create a new subvolume from the snapshot chosen for roll back | * Create a new subvolume from the snapshot chosen for roll back | ||
* Make the new subvolume the default | * Make the new subvolume the default | ||
{{BoxWarning|Don't forget to remove snapshots '''before you run out of space'''|After taking a snapshot you only use the "rest of the volume" for storing everything you change. At some point in time you have to release the snapshot. Don´t use your space up. Btrfs needs '''space to breath.''' Don't use more then 90% or you will get into trouble."}} | |||
{{BoxDanger|NO Snapshots together with quotas|There are reports about massive problems when using '''quotas''' together with snapshots (snapper, timeshift)}} | {{BoxDanger|NO Snapshots together with quotas|There are reports about massive problems when using '''quotas''' together with snapshots (snapper, timeshift)}} |