I am running Ubuntu 19.10 on a USB with persistence and I want to backup all of my data. I have heard that there is a casper-rw file that you can backup, but I can only find a folder called casper-rw, which is empty, and another one called casper-rw1, which is where my data is stored. How can I back it up? I extracted it and made it persistent with Rufus on my Windows computer in case you needed to know
1 Answers
If you created your persistent live drive with mkusb, there is a system for it described at this link.
Generally, you should boot
- from another drive (the easy option if you have another [Linux] operating system)
- if from the persistent live drive, boot it live-only; you can edit the boot option at the boot menu
and then you can use for example sudo rsync ...
or sudo tar ...
to backup
- the whole partition for persistence
- or if a file for persistence
- loop-mount it and backup on the file level
- or copy the whole file for persistence to the backup media.
If you have both a folder called casper-rw, which is empty, and another one called casper-rw1, I think that there are two partitions for persistence. Both are automatically mounted, and the second one to be mounted was given the mountpoint /media/ubuntu/casper-rw1
(or something similar depending on the flavour of Ubuntu).
Please be aware that there can be both confusion and corruption of data, if you boot with two (or more) partitions for persistence connected. It is OK to boot into one persistent live drive, and connect another persistent live drive afterwards (when the boot process has finished and you are at the desktop).

- 46,324
- 5
- 88
- 152
sudo tar
so that file permissions and ownership will be preserved in the backup. Or will you do the backup from Windows? – sudodus Apr 16 '20 at 18:26tar
) – sudodus Apr 16 '20 at 18:33sudo tar -czvf backup.tar.gz /media/ubuntu
and to restore it on a new Ubuntu would I just delete /media/ubuntu then extract backup.tar.gz file to /media? – TheRealTengri Apr 16 '20 at 18:34backup
andrestore
of mkusb also with partitions for persistence made with other tools than mkusb. Inspired by your question I have also upgraded those shellscript to match the developing version of Ubuntu (Focal Fossa) and to be more user friendly. You find them via the unstable PPA,ppa:mkusb/unstable
, where they will reside for testing before migrated to the stable PPA,ppa:mkusb/ppa
via the packagemkusb-common
. – sudodus Apr 18 '20 at 10:14