Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 7691  / 2 Years ago, fri, september 30, 2022, 11:48:38

Taking snapshot of root partition will make possible to roll back to previous state. This is very helpful when something went wrong and/or data loss occurs. This feature can be seen in VirtualBox HDD and the persistence option in live CD. Unlike backup it uses incremental data usage thus less data size. Is it possible to take a snapshot of a file system?


More From » filesystem

 Answers
6

rsync



Taking snapshot of root partition will make possible to roll back to previous state



We call that a backup procedure and for incremental backups you can use rsync ;)



rsync is a utility software and network protocol for Unix-like systems (with ports to Windows) that synchronizes files and directories from one location to another while minimizing data transfer by using delta encoding when appropriate. Quoting the official website: "rsync is a file transfer program for Unix systems. rsync uses the 'rsync algorithm' which provides a very fast method for bringing remote files into sync."3 An important feature of rsync not found in most similar programs/protocols is that the mirroring takes place with only one transmission in each direction.why? rsync can copy or display directory contents and copy files, optionally using compression and recursion.



Remote Backup


Backup over a network is possible, preferably the user should mount the network share to be backed up to prior to launching the program. The share would then be listed in the Browse GUI and could easily be added. There is no separate section for network, if more advanced features are required the user is encouraged to look at alternatives, of which there are many.


Grsync


Grsync is a graphical front end:


enter image description here




More information:



The link has several examples on configuration.


Rsync allows you restore with a timestamp (so if have backups made every second you could also restore it to that second. Not that this is a workable method for a complete system ;-) )




Xen Hypervisor


There are more methods: Xen Hypervisor.


You could run all your operating systems in hypervisors (ie. virtual machines). Xen is an example of such a setup. Basically you turn ALL your operating systems into VMs and you can copy a VM container over to a new name and you would have a backup or restore point.


From the link:



Xen is a type 1, bare-metal virtual machine monitor (or hypervisor), which provides the ability to run one or more operating system instances on the same physical machine. Xen, like other types of virtualization, is useful for many use cases such as server consolidation and isolation of production and development environments (e.g. corporate and personal environments on the same system).


As of Ubuntu 11.10 (Oneiric), the default kernel included in Ubuntu can be used directly with the Xen hypervisor as the management (or control) domain (Dom0 or Domain0 in Xen terminology).


The rest of this guide gives a basic overview of how to set up a basic Xen system and create simple guests. Our example uses LVM for virtual disks and network bridging for virtual network cards. It also assumes Xen 4.1 (the version available in 12.04) and the xend toolstack. It assumes a familiarity with general virtualization issues, as well as with the specific Xen terminology. Please see the Xen wiki for more information.





LVM


Yet another method would be LVM



LVM stands for Logical Volume Management. It is a system of managing logical volumes, or filesystems, that is much more advanced and flexible than the traditional method of partitioning a disk into one or more segments and formatting that partition with a filesystem.


Snapshots


This is something you simply can not do without LVM. It allows you freeze an existing Logical Volume in time, at any moment, even while the system is running. You can continue to use the original volume normally, but the snapshot volume appears to be an image of the original, frozen in time at the moment you created it. You can use this to get a consistent filesystem image to back up, without shutting down the system. You can also use it to save the state of the system, so that you can later return to that state if you mess things up. You can even mount the snapshot volume and make changes to it, without affecting the original.





rsnapshot



rsnapshot iss a filesystem snapshot utility. It can take incremental snapshots of local and remote filesystems for any number of machines.


Local filesystem snapshots are handled with rsync. Secure remote connections are handled with rsync over ssh, while anonymous rsync connections simply use an rsync server. Both remote and local transfers depend on rsync.



Example:


[root@localhost /]# rsnapshot -v daily
echo 1842 > /var/run/rsnapshot.pid
/bin/rm -rf /.snapshots/daily.6/
mv /.snapshots/daily.5/ /.snapshots/daily.6/
mv /.snapshots/daily.4/ /.snapshots/daily.5/
mv /.snapshots/daily.3/ /.snapshots/daily.4/
mv /.snapshots/daily.2/ /.snapshots/daily.3/
mv /.snapshots/daily.1/ /.snapshots/daily.2/
mv /.snapshots/daily.0/ /.snapshots/daily.1/
mv /.snapshots/hourly.5/ /.snapshots/daily.0/
rm -f /var/run/rsnapshot.pid
[root@localhost /]#

[#31824] Saturday, October 1, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ditery

Total Points: 9
Total Questions: 116
Total Answers: 119

Location: Grenada
Member since Sun, Dec 20, 2020
3 Years ago
ditery questions
;