Score:0

I broke Ubuntu and want to backup all the installed programs and files to a USB

pl flag

I broke my Ubuntu and it is failing to boot.

I've tried to save it but failed.

My PC has Windows and Ubuntu.

The good thing is that I can access all my files through windows.

I will install Ubuntu on a different partition and copy the backed up data to it.

But I am not sure which folder contains most of my data like installed programs and personal files.

Score:0
cn flag

For most users, personal files are in your /home directory. Most is stored in "hidden" files, which are simply normal files and directories that start with a period (.) like ~/.config/ -- make sure you capture lots of those.

Do not bother backing up "installed programs". Done properly, those are distributed to several places in the filesystem. Those are easily replaced by apt or snap on your new system.

Abhinav Dharmesh avatar
pl flag
So I can replace the old home folder with the one in the fresh installed Ubuntu??
oldfred avatar
cn flag
Yes and that normally is most of your settings & data. If you manually edited some system file in /etc, you may need to save that but not copy back without checking. I edit grub and just save a copy in /home for my backup. Best to export a list of installed apps when system is working to make it easy to restore. https://askubuntu.com/questions/464701/find-out-what-packages-were-installed-after-os-install & you can exclude temp data in /home. http://askubuntu.com/questions/545655/backup-your-home-directory-with-rsync-and-skip-useless-folders
Abhinav Dharmesh avatar
pl flag
Thanks a lot man.
uz flag
Jos
If you created cron jobs, you may also want to backup `/var/spool/cron/`.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.