backup
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| backup [2026/06/19 07:03] – usera | backup [2026/06/19 09:14] (current) – usera | ||
|---|---|---|---|
| Line 27: | Line 27: | ||
| - An external USB stick to install CloneZilla. It should be at least 1GB and be used only for CloneZilla | - An external USB stick to install CloneZilla. It should be at least 1GB and be used only for CloneZilla | ||
| - | ==== STEP 1.1: prepare the CloneZilla USB stick ==== | + | ==== STEP 1: prepare the CloneZilla USB stick ==== |
| First, [[https:// | First, [[https:// | ||
| Line 64: | Line 64: | ||
| If so, you are sure to have the right file. You can then proceed to flash you USB key. I recommend using [[balena-etcher|Balena Etcher]], which is Open Source, user friendly and cross platform. | If so, you are sure to have the right file. You can then proceed to flash you USB key. I recommend using [[balena-etcher|Balena Etcher]], which is Open Source, user friendly and cross platform. | ||
| - | ==== STEP 1.2: do the actual backup ==== | + | ==== STEP 2: do the actual backup ==== |
| you can then follow the [[https:// | you can then follow the [[https:// | ||
| - | Once this is done, you can do another backup of your /home, which contains all your regular files. For this you can use the software backintime. You can install it with: | ||
| - | < | ||
| - | sudo apt install backintime-qt | ||
| - | </ | ||
| - | Before launching it, we need to decrypt the encrypted disk, and mount the logical volume we intend | + | ===== Restic (to use regularly to make encrypted snapshots of your folders (ie: not your programs)) ===== |
| - | < | + | |
| - | sudo cryptsetup luksOpen /dev/sdb2 cryptsetup | + | |
| - | sudo vgchange -ay | + | |
| - | sudo mount / | + | |
| - | </ | + | |
| - | now everything written on /mnt on your computer will be written | + | This second backup tool is to be used regularly to backup your Home directory (for example the /C/ |
| - | You can then launch backintime with: | + | It is called [[https:// |
| - | < | + | |
| - | sudo backintime-qt | + | |
| - | </code> | + | |
| - | you can then configure it to save things in /mnt: | + | ==== Installation ==== |
| - | {{ :: | + | you can follow the instructions [[https://restic.readthedocs.io/ |
| + | === Case of a Debian based Linux OS === | ||
| - | {{ :: | + | Open a terminal and enter: |
| + | < | ||
| - | {{ :: | + | === Case of MacOS === |
| - | And then click on "Take snapshot" | + | you can install it using brew. If brew is not installed |
| - | {{ :: | + | < |
| - | you can then unmount and remove your backup disk: | + | when this is installed, |
| - | < | + | <code> brew install restic </code> |
| - | sudo umount | + | |
| - | sudo vgchange | + | |
| - | sudo cryptsetup luksClose cryptodisk | + | === Case of Windows === |
| - | </ | + | |
| + | open a powershell terminal, then enter: | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | ==== Initialisation of the backup folder ==== | ||
| + | |||
| + | More detailed infos can be fond [[https:// | ||
| + | |||
| + | Make a directory for the backup location. The open a terminal and enter: | ||
| + | |||
| + | < | ||
| + | |||
| + | You will be asked a password. You should choose a strong password, either directly generated from [[diceware|the diceware method]] or randomly generated by a password manager that is locked by a password generated by [[diceware|the diceware method]]. | ||
| + | |||
| + | ==== Do the actual backup ==== | ||
| + | |||
| + | open a terminal and enter: | ||
| + | |||
| + | < | ||
| + | |||
| + | you will be asked for your password and informed about the process. If it is the first snapshot of a big folder, it can take a bit of time. | ||
| + | |||
| + | |||
| + | ==== If you need to restore a snapshot ==== | ||
| + | |||
| + | More infos can be found [[https:// | ||
| + | |||
| + | First, you can see the existing snapshots in your backup folder by entering: | ||
| + | |||
| + | < | ||
| + | |||
| + | which will give the following output: | ||
| + | |||
| + | < | ||
| + | repository 7d765fa4 opened (repository version 2) successfully, | ||
| + | ID Time | ||
| + | ------------------------------------------------------------------------------------------ | ||
| + | 9e4398a4 | ||
| + | ------------------------------------------------------------------------------------------ | ||
| + | 1 snapshots | ||
| + | </ | ||
| + | |||
| + | Note that you need to know your password to do this, as all backups made by restic are encrypted. Pick up the ID of the snapshot you want to restore, for example in our case '' | ||
| + | |||
| + | To see all files in this snapshot, enter: | ||
| + | |||
| + | < | ||
| + | |||
| + | which will give the following output: | ||
| + | < | ||
| + | enter password for repository: | ||
| + | repository 7d767fa4 opened (repository version 2) successfully, | ||
| + | snapshot 9e4398a4 of [/ | ||
| + | /testdir2 | ||
| + | / | ||
| + | |||
| + | if you would like to restore the whole snapshot to a specific directory, enter: | ||
| + | |||
| + | < | ||
| + | < | ||
| + | restoring snapshot of [/ | ||
| + | |||
| + | It is possible to restore only a folder or file by changing '' | ||
backup.1781852632.txt.gz · Last modified: by usera
