this post was submitted on 07 Apr 2024
2 points (100.0% liked)

Linux

47237 readers
3343 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hi! A friend just recommended the backup tool that comes with Ubuntu. I took a look at it and was wondering what you guys include and exclude from the backups. I just installed wire guard VPN and but the config file in the etc/wireguard folder, where it belongs. I would have to include this folder as well if I want to keep my configs. And I guess many programs do the same, so how do you know what to include, so you can just revert to the last backup if something breaks or you get a new machine? Maybe that is a stupid question, but it was going through my head for some time now. Thanks a lot!

top 7 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 5 months ago

My philosophy is "anything I can't reproduce easily". This will vary depending on the machine and data. But it's been a good guide so far.

[–] [email protected] 1 points 5 months ago

I generally backup the entire home folder and the configuration files.

[–] [email protected] 0 points 5 months ago (1 children)

Data and configurations.

If you have the space, software is nice because it's easier to get the system going again, but the data (your files - music, documents, pictures) and system configuration files (/etc for example) are the most critical. If you have databases set up, learn about their dump commands and add that.

You don't have to use the same method for everything. My pictures are backed up to another side in a second computer and to Amazon Glacier for $2/month (I'll have to pay to download them if I ever need it, but I'll gladly pay if I'm in that situation - those should only be needed if I have a major house fire or something like that). My weekly backups are my /home directories, /etc, /root, a database dump, and maybe one or two other important things.

[–] [email protected] 1 points 5 months ago

Really configuration is best not backed up but created from some source of truth like a Git repo. But a backup can serve as a poor-man's version control.

[–] [email protected] 0 points 5 months ago* (last edited 5 months ago) (1 children)

If you want to be able to restore the machine completely, with everything installed and configured, then yes you have to backup everything. There's generally two ways, file-level backup where you'd use something like rsync, tar, etc. and block-level where you'd backup the whole partition/disk using something like dd, clonezilla, etc. The latter is the easiest to restore but it's a bit of a pain to backup because the system generally has to be offline, booted from alternative OS. The forner is a bit more difficult to restore but not by much, and it's so easier to backup. You can do it while the system is live. I'd probably try that first. Find documentation on backing up a complete root filesystem with rsync/tar and you're good to go. Some ideas. It's typically a single command which can be run on a schedule.

The built-in GUI backup tool is generally intended for your own user data. In order to be able to backup other things it'll have to run as root or be given caps and that might get more complicated than using straight rsync/tar.

[–] [email protected] 0 points 5 months ago (1 children)

What I am always wondering, to set up Linux until everything runs without problem, it takes quite some time for me. I use Linux for about a year regularly, and had to set it up about 4-5 times. And it almost always is a pain and I need to search online for some time until everything works. Is it getting easier the more often it's done? Or do you create a setup script that runs everything if you reinstall the system?

[–] [email protected] -1 points 5 months ago

@avidamoeba @WbrJr Just install a pre-configured distro like Mint or Fedora and stay away from Arch