Project

General

Profile

Feature #13457

Feature #5301: Backup system for the Persistence

Test backup script by a2

Added by sajolida over 2 years ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
07/12/2017
Due date:
% Done:

0%

Feature Branch:
Type of work:
Test
Blueprint:
Starter:
Yes
Affected tool:

backup.bash (3.47 KB) sajolida, 09/03/2019 01:01 PM

duplicate.bash (5.92 KB) sajolida, 09/03/2019 01:01 PM

restore.bash (3.47 KB) sajolida, 09/03/2019 01:01 PM


Related issues

Related to Tails - Feature #12214: Document a way to manually backup persistent data Duplicate 02/06/2017
Related to Tails - Feature #14605: Improve documentation on "Manually copying your persistent data to a new USB stick" Resolved 09/05/2017

History

#1 Updated by sajolida over 1 year ago

  • Assignee set to sajolida

#2 Updated by sajolida over 1 year ago

  • Target version set to Tails_3.9

#3 Updated by sajolida over 1 year ago

  • Target version changed from Tails_3.9 to Tails_3.10.1

#4 Updated by u over 1 year ago

  • Related to Feature #12214: Document a way to manually backup persistent data added

#5 Updated by u over 1 year ago

  • Related to Feature #14605: Improve documentation on "Manually copying your persistent data to a new USB stick" added

#6 Updated by sajolida about 1 year ago

  • Target version changed from Tails_3.10.1 to Tails_3.11

#7 Updated by sajolida about 1 year ago

  • Target version changed from Tails_3.11 to Tails_3.12

#8 Updated by sajolida 11 months ago

  • Target version changed from Tails_3.12 to Tails_3.13

#9 Updated by sajolida 9 months ago

  • Target version changed from Tails_3.13 to Tails_3.14

#10 Updated by CyrilBrulebois 7 months ago

  • Target version changed from Tails_3.14 to Tails_3.15

#11 Updated by CyrilBrulebois 5 months ago

  • Target version changed from Tails_3.15 to Tails_3.16

#12 Updated by intrigeri 4 months ago

  • Target version deleted (Tails_3.16)

Hi!

We've set up an automated process to ask our fellow contributors to update some tickets of theirs, in order to:

  • better reflect your plans;
  • bring down your amount of work-in-progress to a sustainable level;
  • encourage team work and increase the chances that someone finishes the work;
  • avoid a human doing ticket triaging and asking you the same questions on each such ticket.

In particular, this process identifies:

  • Stalled work-in-progress
  • Reviews waiting for a long time

However, in the current state of things, this process is not able to notice those tickets when their Target version has been repeatedly postponed by our Release Managers. Therefore, the ticket triaging team decided on #16545 to remove the Target version whenever in such cases, when it does not feel realistic. This is what I'm doing on this ticket.

You now have a few options, such as:

  • Deassign yourself. That's fine. If it really matters, someone else, possibly you, may pick it up later. Then, if this ticket is relevant for a Tails team, bring it to their attention; else, forget it and take care of yourself :)
  • If you think you can realistically come back to it and finish the work in the next 6 months, say so on this ticket, for example by setting a suitable "Target version". This will communicate your plans to the rest of the project and ensure the task pops up on your radar at a suitable time. Of course, you can still realize later that it is not going to work as planned, and revisit today's choice.

Cheers!

#13 Updated by sajolida 3 months ago

Attaching the scripts and copying below the original messages:

three utilities that i wrote from scratch; they are provided here
without restriction in the hope someone finds them useful.

* duplicate primary USB to identical or larger USB drive
* backup persistent contents to the Persistent Folder
* restore from backup above

i find the duplicate utility essential and recommend it be included in
Tails. I've had a few instances where my computer halted (battery ran
out) and the usb drive was completely ruined with all data
unrecoverable, my only luck was that i had actually run my duplicate
previously! phew!!!

also, installing these under ~/.local/share/applications helps too.

Install [note, i've only done this once and it worked; so the setup
procedures should be tested with other systems.]

Manually add the following mapping to the
/live/persistence/TailsData_unlocked/persistence.conf file:

/home/amnesia/.local    source=local

Then reboot to establish persistence for these "local" customizations.

Next drop the attached files in the
/home/amnesia/.local/share/applications/ folder and the utilities will
magically show up in the menus under "Accessories"! The *.bash files
must have execute permission.

INFO:

The duplicate.bash script checks to see if the two USB's are identical,
and if so it does a dd copy of the entire drive; if not identical it
attempts to create matching partitions on the target drive and dd's the
two partitions separately. That way you SHOULD be able to duplicate a
drive to another usb that isn't identical, but is at least a little bigger.

The backup.bash and restore.bash scripts are identical and use the
filename to determine which function to perform; backup puts the backup
file in the /home/amnesia/Persistent folder then i manually move it to a
cloud or another computer and then i wipe the backup file to free up the
space. Ideally, it would prompt for a target network destination, maybe
i'll add that in the future.

These have been working for me, but more testing is surely necessary.

The dup utility has saved my ass more than once! one of my usb drives
was completely destroyed (can't even format it) when my PC ran out of
battery power and shutdown abruptly.  i highly recommend a duplicate
feature be added to tails!!

let me know if you find these useful. good luck.

-a2

#14 Updated by sajolida 3 months ago

  • Status changed from Confirmed to Resolved
  • Assignee deleted (sajolida)
  • Target version set to Tails_3.16

Comparing these utilities with the doc that I've rewritten in #14605:

  • Both options require the user to set an admin password and enter each time.
  • Both options require running 1 command on the command line, unless we include them in Tails.
  • duplicate.bash achieves similar result as #14605 or S1 from https://tails.boum.org/blueprint/backups, but it uses dd which will take much longer.
  • restore.bash looks a bit like S4 from https://tails.boum.org/blueprint/backups but it seems to only allow restoring everything, which would make the whole Persistence jump back in time.
  • All utilities are written in Shell, which is a language that we are deprecated for custom programs. See #11754.

So I'm not interested in documenting how to use these utilities because they wouldn't improve much on the upcoming doc in #14605.

Including them in Tails would need a lot more work, rewriting in a better programming language, polishing the UX, getting the functioning of duplicate.bash closer to S1, etc.

Also available in: Atom PDF