Ubuntu backup using bash commands/command line
So i accidentally run the command:
sudo chmod -R 2777 /
Wenever i login, it would only bring up the bash command line interface. Now how can i backup my system using only bash commands?
i have tried some post:
http://ubuntuforums.org/showthread.php?t=1422712
sudo tar cvpzf ../../home/$backupUser/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys --exclude=/media /
but requires sudo
, which i can't do right now.
Insert an external HDD formatted on another machine using FAT if none of your files are >4GB and type the following command:
ls /media/$USER
That will give you a list of names one of which is your hard drive. Then copy the files over by issuing:
cp --verbose /home/$USER/* /media/$USER/NameOfHDD
Where you substitute NameOfHDD
for the name you found previously (I cannot tell you which: it depends on the HDD itself and how it was formatted)
And then you wait until it finishes...
To restore just type:
cp --verbose /media/$USER/NameOfHDD/* /Home/$USER/
(if both user names before and after re-install are the same!)