4

I would like to backup everything on my computer (as simply as poss) and save it somewhere else like a usb drive.

For example I would like to copy everything, my desktop, theme, all my favourites from different browsers like brave\chrome and their extensions\add on, downloads folder, etc. So when I rebuild my computer I am able to see it like it was before (or close to it). If something needs to be omitted from the above then please advise. I am looking for a standard way to backup my computer, either via an app or the terminal.

Can someone show me the exact command lines I will need to write into the terminal for this.

Then the exact command lines to write, after I have logged into a new computer or user profile to copy everything over.

I understand to reinstall the new apps for simplicity's sake. If I reinstall Brave from scratch for example, will I still be able to retrieve my favourites? If so, please can someone advise how.

(I had edited the above, after the suggestions made).

I am using Ubuntu 20.04.

I am new to Linux.

Thanks in advance.

Reme
  • 303
  • 2
  • 3
  • 7
  • That's not a "user profile". That's your entire /home/your_username directory. It's easy...if you exclude applications. If you include applications, then it's super hard: Applications are stored elsewhere on the system, and should be installed by a package manager. Consider dialing back your wish list. – user535733 Oct 03 '20 at 19:11
  • "there are different command lines talked about later on in the thread, which makes me unsure" - if you're unsure about something in particular, you should ask. – Nmath Oct 03 '20 at 19:31
  • All the data folders like Music, Documents, etc are in data partition and /home is mostly the hidden . (dot) files. I also move some hidden folders like Thunderbird & Firefox profiles which can get larger. /home is now 1.4GB. (Seems large I need to check whats there). Are you backing up your data, normally in /home also? That should just be part of normal backups. http://askubuntu.com/questions/545655/backup-your-home-directory-with-rsync-and-skip-useless-folders & http://askubuntu.com/questions/40992/what-files-and-directories-can-be-excluded-from-a-backup-of-the-home-directory/40997#40997 – oldfred Oct 03 '20 at 19:46
  • 1
    Hae you tried Deja-Dup (Very easy to use) ? (If you want to install it Just type sudo apt-get install deja-dup and then either via super(button) or just terminal: "deja-dup" There you can choose what to backup/What to ignore, and you can choose other alts as well, such as online storage(google drive If I remember correctly..?) and local-storage. – William Martens Oct 03 '20 at 21:40
  • Have you tried using the default backup software that comes with the Desktop version of Ubuntu? By default it will backup everything in the /home/yourusername folder, including your downloads, personal settings, bookmarks, and browser extensions. It is easy to setup. However, this does not include any apps you install or anything that asks for your password. – user68186 Oct 03 '20 at 23:29
  • Not a good idea to back up "everything". Very time consuming, and your backup is quickly obsoleted. Instead focus all these efforts in backing up your user files. These are the only ones that are unique in the world, and hence worthy of an at least triple and up to date backup. Operating systems are reinstalled and reconfigured in less than an hour, and later versions get better all the time. – vanadium Oct 04 '20 at 11:40

3 Answers3

2

Because you're a newbie I suggest you to install and use deja-dup. It's a backup graphical interface very easy to use. You can make backup of your home directory and save it on the cloud or in a usb device. You don't need to backup your entire system, just the configuration folders and files in your home directory. If you're on 20.04 you can install deja-dup by sudo apt install deja-dup or by sudo snap install deja-dup

Lews
  • 342
  • 1
  • 7
  • One would want to maintain a list of installed software and version numbers somewhere in the backed-up directory tree. dpkg --get-selections >$HOME/get-selections.out every time any software update is done. Read man dpkg. – waltinator Oct 04 '20 at 00:06
  • There's no need to install it in Ubuntu 20.04 because is already included. – pat Oct 10 '20 at 16:12
  • @pat I'm sorry but I have lubuntu and it's not installed. – Lews Oct 10 '20 at 16:14
  • Thank you for your answer. As asked below is there a reason why I should use deja-dup, or am I ok to just copy and paste home directory into my usb stick? – Reme Oct 10 '20 at 22:19
  • No, it's easier to use. – Lews Oct 10 '20 at 22:33
1

Pasted from my other post:

Pinguybuilder is a tool that can create a ISO out of the running system (containing all its files, applications and configurations) which then can be used to re-install the system in the state it was when the ISO was created.

There are different packages at the link above, the one that worked for me in Kubuntu 20.04 was pinguybuilder-menu-based_5.2-1_all.deb which lacks a GUI in the proper sense (unlike in the tutorials I see on the net that all involve a GUI). After installation it shows a group of launchers, each with a different purpose. One of them automatically creates a ISO out of the running system.

The ISO is saved in /home/PinguyBuilder/.

The above has the advantage of creating a much smaller image than the one of the entire partition. (It takes time to "squash" the files into a small partition though: in my case it ended up with a 2.4 GB iso out of a 17 GB system.) Another advantage is the integrity of the image is easier to verify (by flashing it on a usb and booting) than that of a partition image.


For the purpose of simply creating a system back-up the most recommended these days is Timeshift. It is meant to be used for recurrent backups of the system from within the system, and the backups are also meant to be restored from the running system (after restart). It is less suited to restore after a system or drive failure (although it should work also from a live session; personally I had problems with the program recognizing/accessing all of its backups in such cases though.)

cipricus
  • 3,444
  • 2
  • 34
  • 85
0

There is no single method that works best for everybody.

Here is one way: I use a three-step method.

  1. I keep a journal (it used to be on paper, now it's a text file). I simply keep notes about what I install or customize.

    • What I install, when, why.
    • The URL of the instructions that I followed.
    • The exact commands I used.

    This means I can rebuild my system quickly and easily anytime. I DON'T back up applications - my journal tells me where to find them and how to install them.

  2. Passwords their associated URLs go into my separate, secure Password Manager. The PM syncs to my phone, and my Journal happens to be a file in the PM.

  3. I backup the data in my /home/me directory using the Ubuntu Backup tool (deja-dup).

    • Email, browser profiles, user-level application settings and application data.
    • Media, photos, personal files, etc.

When building from scratch, I start with my phone.

  • Open the Password Manager on my phone and retrieve my Journal.
  • Use the Journal's notes to reinstall applications and customizations. Takes about 5 minutes.
  • After the system is set up, I launch Backup and restore my data onto the system. Takes another 5 minutes.
user535733
  • 62,253
  • Thank you for your 3 step suggestions. Good way to keep it organised. Just want to double check, if I only copy everything from my Home directory, will I have my favourites from my multiple browsers, desktop theme settings etc. Then when I download and reinstall those browser apps later, on the new build, will they show my original favourites? Also I take it I will have to reinstall the browser add-ons as well? Also is there a difference between using deja-dup and, just copying the home directory and pasting it into my usb stick? – Reme Oct 10 '20 at 22:16