Yes, if you want to copy everything under /
, then you can do:
sudo cp -r / media/username/TOSHIBA\ EXT/root_copy/
But, before proceeding... you need to be aware that you don't really want to copy everything under /
:)
You typically only need to copy your data; not all the OS binaries, installed applications, configuration files, etc. Which is what the about command would do.
If OS upgrade goes bad, it's not going to be straightforward to "copy over" everything. If you had your data, you can simply reinstall the OS and copy back the data from the external disk/medium.
Also, if you have set up other partitions than the one you have the OS installed and keep the data there, then you may not need to copy externally at all. You can keep your data in a separate partition. If the OS reinstall goes bad, you can just wipe that partition and reinstall the OS without touching the other partition where you kept the data.
/home/*/.cache
, that is also several gigabytes you don't need. – Simon Richter Jul 09 '20 at 11:49bash: /root/tar-errors.txt: Permission denied
. I did run it with sudo but it did not prompt for the password. – scribe Jul 09 '20 at 22:23... 2> sudo tee /root/tar-errors.txt
(and installtee
if it's not there already) – Canadian Luke Jul 09 '20 at 22:43sudo -i
and log in as a sudoer and thencd /
. After that I ran the command and it is running just fine. – scribe Jul 09 '20 at 23:05... 2>&1 | sudo tee /root/tar-errors.txt
(includes stdout too, which I assume to be desirable)? You can't pipe stderr to a command like that. – vikarjramun Jul 10 '20 at 02:32tee
myself – Canadian Luke Jul 10 '20 at 16:152> >(sudo tee /...)
, but the comment was missing some syntax – D. Ben Knoble Jul 10 '20 at 16:18