Giter Site home page Giter Site logo

Comments (6)

fititnt avatar fititnt commented on September 24, 2024

These scripts may acidentaly destroy data.

I think we can do some extra checks (like require create some files that allow backup/restore, so if an user run by accident, it will need manual action).

Not sure about the better naming scheme, but we could somewhat think this as database replication naming. If I remember, MariaDB uses primary/replica and MySQL source/replica instead of master/slave.

from adhocsecurebox.

fititnt avatar fititnt commented on September 24, 2024

Without sudo, using the official documentation at https://tails.boum.org/doc/first_steps/persistence/backup/index.en.html, we have these errors:

rsync -PaSHAXv --del /live/persistence/TailsData_unlocked/ /media/amnesia/TailsData

amnesia@amnesia:~$ rsync -PaSHAXv --del /live/persistence/TailsData_unlocked/ /media/amnesia/TailsData
sending incremental file list
rsync: failed to set times on "/media/amnesia/TailsData/.": Operation not permitted (1)
rsync: recv_generator: mkdir "/media/amnesia/TailsData/Persistent" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
./
.rsync-filter
             47 100%    0.00kB/s    0:00:00 (xfr#1, ir-chk=1017/1019)
apt_sync_completed
              0 100%    0.00kB/s    0:00:00 (xfr#2, ir-chk=1016/1019)
apt_sync_started
              0 100%    0.00kB/s    0:00:00 (xfr#3, ir-chk=1015/1019)
live-additional-software.conf
             13 100%   12.70kB/s    0:00:00 (xfr#4, ir-chk=1014/1019)
rsync: send_files failed to open "/live/persistence/TailsData_unlocked/persistence.conf": Permission denied (13)
rsync: send_files failed to open "/live/persistence/TailsData_unlocked/persistence.conf.bak": Permission denied (13)
Persistent/
rsync: mkstemp "/media/amnesia/TailsData/.rsync-filter.3dkd2c" failed: Permission denied (13)
rsync: mkstemp "/media/amnesia/TailsData/.apt_sync_completed.p4dvF9" failed: Permission denied (13)
rsync: mkstemp "/media/amnesia/TailsData/.apt_sync_started.Vv8Ni6" failed: Permission denied (13)
rsync: mkstemp "/media/amnesia/TailsData/.live-additional-software.conf.nnZ7V2" failed: Permission denied (13)
rsync: opendir "/live/persistence/TailsData_unlocked/apt/cache/partial" failed: Permission denied (13)
rsync: opendir "/live/persistence/TailsData_unlocked/apt/lists/partial" failed: Permission denied (13)
rsync: opendir "/live/persistence/TailsData_unlocked/greeter-settings" failed: Permission denied (13)
rsync: opendir "/live/persistence/TailsData_unlocked/lost+found" failed: Permission denied (13)
rsync: failed to set times on "/media/amnesia/TailsData/apt": Operation not permitted (1)
rsync: failed to set times on "/media/amnesia/TailsData/apt/cache": Operation not permitted (1)
apt/
apt/cache/
apt/cache/git-gui_1%3a2.20.1-2+deb10u3_all.deb
      1,002,424 100%   17.07MB/s    0:00:00 (xfr#7, to-chk=83/2126)
rsync: failed to set times on "/media/amnesia/TailsData/apt/cache/partial": Operation not permitted (1)
rsync: opendir "/media/amnesia/TailsData/apt/cache/partial" failed: Permission denied (13)
rsync: failed to set times on "/media/amnesia/TailsData/apt/lists": Operation not permitted (1)


(...)

: Permission denied (13)
rsync: mkstemp "/media/amnesia/TailsData/apt/lists/.vwakviie2ienjx6t.onion_debian_dists_sid_main_i18n_Translation-en.diff_Index.yC4GK6" failed: Permission denied (13)

sent 236,411,823 bytes  received 11,341 bytes  157,615,442.67 bytes/sec
total size is 571,449,817  speedup is 2.42
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]

from adhocsecurebox.

fititnt avatar fititnt commented on September 24, 2024

Now with sudo.

sudo rsync -PaSHAXv --del /live/persistence/TailsData_unlocked/ /media/amnesia/TailsData

amnesia@amnesia:~$ sudo rsync -PaSHAXv --del /live/persistence/TailsData_unlocked/ /media/amnesia/TailsData

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for amnesia: 
sending incremental file list
./
.rsync-filter
             47 100%    0.00kB/s    0:00:00 (xfr#1, ir-chk=1017/1019)
apt_sync_completed
              0 100%    0.00kB/s    0:00:00 (xfr#2, ir-chk=1016/1019)
apt_sync_started
              0 100%    0.00kB/s    0:00:00 (xfr#3, ir-chk=1015/1019)
live-additional-software.conf
             13 100%   12.70kB/s    0:00:00 (xfr#4, ir-chk=1014/1019)
persistence.conf
            496 100%  484.38kB/s    0:00:00 (xfr#5, ir-chk=1013/1019)
persistence.conf.bak
            496 100%   21.06kB/s    0:00:00 (xfr#6, ir-chk=1012/1019)
Persistent/
Persistent/.tailsdata-is-source
              0 100%    0.00kB/s    0:00:00 (xfr#7, ir-chk=1005/1024)

(...)


nm-system-connections/
nm-system-connections/Rocha.nmconnection
            339 100%    0.52kB/s    0:00:00 (xfr#1488, to-chk=5/2133)
nm-system-connections/Wired connection
            188 100%    0.29kB/s    0:00:00 (xfr#1489, to-chk=4/2133)
openssh-client/
openssh-client/id_rsa -> /lib/live/mount/persistence/TailsData_unlocked/dotfiles/.ssh/id_rsa
openssh-client/id_rsa.pub -> /lib/live/mount/persistence/TailsData_unlocked/dotfiles/.ssh/id_rsa.pub
openssh-client/known_hosts
            442 100%    0.67kB/s    0:00:00 (xfr#1490, to-chk=1/2133)
pidgin/
pidgin/prefs.xml
         17,893 100%   27.05kB/s    0:00:00 (xfr#1491, to-chk=0/2133)
thunderbird/

sent 571,715,961 bytes  received 31,273 bytes  2,203,264.87 bytes/sec
total size is 571,450,406  speedup is 1.00

Running again. Note that sometimes it get stuck, and since we're running with sudo to watch via task mananger would need to open the task mananger with sudo sudo gnome-system-monitor

sudo rsync -PaSHAXv --del /live/persistence/TailsData_unlocked/ /media/amnesia/TailsData

amnesia@amnesia:~$ sudo rsync -PaSHAXv --del /live/persistence/TailsData_unlocked/ /media/amnesia/TailsData
[sudo] password for amnesia: 
sending incremental file list

sent 61,768 bytes  received 674 bytes  124,884.00 bytes/sec
total size is 571,450,406  speedup is 9,151.70

from adhocsecurebox.

fititnt avatar fititnt commented on September 24, 2024

From sudo rsync -PaSHAXv --del /live/persistence/TailsData_unlocked/ /media/amnesia/TailsData to

sudo rsync \
    --partial --progress \
    --archive \
    --sparse \
    --hard-links \
    --acls \
    --xattrs \
    --verbose \
    --delete-during \
    /live/persistence/TailsData_unlocked/ \
    /media/amnesia/TailsData

I know it's the same thing. But for scripts, I find it better to know what is every part is doing.

from adhocsecurebox.

fititnt avatar fititnt commented on September 24, 2024

Just used again the bin/backup-tailsdata-to-usb-stick.sh v1.0. The message "Writting data to Generic Flash Disk / Device should not be unplugged." persisted for around 1 minute after clicked to eject. (maybe there was around one extra minute before tryint go eject). So when writting a a good amount of data to USB flash drives (on my case its a very cheap one) is pertinent to warn the user,

Screenshot from 2020-10-26 21-42-36

from adhocsecurebox.

fititnt avatar fititnt commented on September 24, 2024

I think we could close this issue for now. But the #11, since I did not done a full test, will keep open for more time.

from adhocsecurebox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.