Skip to content

Good tips on partitioning and backups?

I have usually just installed ARCH in a single partition and backed up everything by clonezilla to my external hard drives. By time it wastes lot of disk. I feel like its better if I backup my home files on different location and system and boot on different. My file system that I use is ext4.

​

I am wondering how are people usually partition their arch when installing? Is it possible to make a alternate partition on same drive that has a older version of the data of the system information and booting info? I guess BTRFS might be the solution but havent gotten to it yet.

11 points33 comments
Open on Reddit
About this post
Posted
Archived
Score
11 · 100% up
Kind
Text
ID
9ticet

Author

112
posts
471
comments
2
media
View profile

36 comments

In my opinion, keep it simple, single root partition with any extras as required only (such as an efi partition on a UEFI system and one for swap). I would only ass others if they make sense to do so or offer any advantage to your system.

As for backups, I backup data only - mostly code via git. Applications and configs I have stored in a repo and baked into packages, user config I don't generally care about but there are many methods to back and sync them..

As for other data, it is a toss up between not caring about them enough to worry about, backing up to cloud services and USB storage as required.

18 points

I've actually stored my dotfiles and git repos on my private repo so they r fine.

I guess some people use different partition for home and system. Not sure what are the main pro's tho

1 points

Reinstallation, but with are you have full control over the partitioning at install so don't actually have to reformat to do so. So the benefit is lessened.

1 points

I use a separate /home partition, a root partition, and a swap partition.

This has worked out well for many years as I have occasionally made a mess of the root. In such cases, a reinstall will not overwrite the /home partition if you select manual partition choices when reinstall.

Furthermore, your backups can be just /home partition images. That's a big savings of time and storage space. And data restoration is quicker too.

16 points

I've gotten used to swap files.

​

Never even thought about reinstalling and not affecting the other partitions that way. I think I've got to test more.. cos not sure how to reinstall only on certain partition.

​

Sounds good to only backup home partition and probably keeping list on the things that I've installed.

2 points

I am wondering how are people usually partition their arch when installing?

I have an unencrypted boot partition and encrypted root, home and swap partitions (in my case spread across two drives).

I currently do backups with Borg Backup (I used rsnapshot before) which you can find in Arch's repositories. It's probably much more than I need at home but it's dead easy to setup, works like a charm and has some really nice properties (deduplication, ...)

9 points

I have used borgbackup with cron on my server daily. Never thought about using it on my laptop etc. Might be a good way to roll back when I learn the routines.

​

lukscrypt to encrypt home and root?

2 points

Same setup here, with LVM on luks.

​

I also push the borg backups to backblaze B2 using rclone.

1 points

I keep a separate /, /var, /home and run btrfs on all of them. I bind /var/lib to the / btrfs subvolume, as it's usually better to keep those two together and coherent. This is the first of the 3 recommended backup copies (local on-line) I run.

Then I abuse btrbk and keep 24 hourly snapshots, 7 daily, 4 weekly and 12 monthly for all of those. I clone all of them to my home NAS, and keep all yearlies in there too. This is the second of the 3 recommended backup copies (remote on-line).

And that NAS gets replicated daily to a twin machine at my parent's home, to satisfy my paranoia. This makes the third of the 3 recommended backup copies (remote off-line).

For extra paranoia corner cases such as family pictures or important documents, I sync them to my local Nextcloud, that is also replicated at my parent's, and for the extremely important documents, I also GPG them and back them up to Google Drive on both my personal and my G Suite account.

7 points

I keep a separate /, /var, /home

Separate partition or subvolume?

3 points

/home should ALWAYS be on a separate partition. You can even switch distros while keeping the same /home

3 points

I've experienced some problems of accumulation of distro specific dot files due to jumping from distro to distro in my user top level directory.

I've figured a way to dump this junk rather than growing it, but the explanation is a bit long.

2 points

I would 100% recommend, as a bare minimum, a separate boot partition. Personally I use one partition for boot, one partition for EFI, and a third, which I set up LVM on. Under my LVM volume group, I set up one volume for root, one for home, and depending on the application (if it's a web or media server), I'll set up another for srv.

2 points

I avoid LMV schemes. I dont have any reason use such abstractions. Separate boot partition may be necessary in dual boot schemes withv Windows, but otherwise unnecessary. I also avoid encryption of storage devices as I'm sole user and recovery is near impossible if the password is forgotten.

1 points

The reason I recommend a separate boot partition is so there’s always /some/ space on your drive, even if you somehow accidentally fill root. LVM is super nice for resizing partitions, and being able to add more storage effortlessly.

1 points

I love LVM, and used it for many years. IMO, using plain partitions, even GPT ones, is so "primitive". :-)

What bootloader are you using? I'm using systemd boot but thinking about returning to grub. My feeling is that grub makes booting other distros easier. Not sure, though.

1 points

I use one root partition with two btrfs subvolumes for / and /home. Then two subvolumes for snapper snapshots for these two subvolumes. Every hours i have a custom backup script which backups the most recent snapper snapshot into a remote borg repository. This is then duplicated to a cloudprovider. Should probably move the remote repository to my NAS honestly. Also i only care about backups of /home. Everything else on my system should be inside packages and have no significant value.

1 points

Everything else on my system should be inside packages and have no significant value.

I think a backup of /etc is important too. There are so many small adjustments I made over time, I'd rather not loose them.

1 points

I have two drives and on the smaller one I have two partitions. One is root and the other is boot. On the other drive that's larger I have home.

I am using ext4 because it's the most mature filesystem. Except on boot which is fat32 because of EFI.

I backup to either git repos, cloud, or external hard drive with rsync, depending on what it is I am backing up.

1 points

I used to do the separate partitions out of habit but last time I went with just EFI partition, root partition with swapfile. Simplicity won out for me, and I always regretted how much space I assigned to each partition anyways. Also with Arch it's easy to reinstall with this setup, you just delete everything except /home and pacstrap.

1 points

I have / on btrfs, an ntfs /data partition that has all the real libraries and more. I often distrohop and have dual boot linux installs, so I have a /home partition that holds all home directories. I have feetongrass_common, feetongrass_arch, feetongrass_ubuntu, and so on. my username is feetongrass on all installs, but I edit /etc/passwd to change the home directory accordingly. Under /home/feetongrass_common, I have stuff like .thunderbird, .ssh, and so on that I just symlink in my other home partitions. I also symlink my Pictures, Downloads, etc from the /data partition. Over the past 6 months I have distrohopped close to 100 times without losing any of my data.

1 points

Setup that worked for me so far Partitions: /boot, /root, swap, home(separate hard drive cuz it'll get large af) As for backup, I use an encripted hard drive (rack) that I remove every time the backup is completed. I use a backup script that mounts the drive and uses rsync with a black list file so stuff like firefox cache etc get's ignored. I run the backup script manually every now and then but mostly when I do some progress with my small projects.

1 points

Many years ago, I began using Mandrake Linux. They always recommended doing separate / home and swap partitions. For the most part I have continued using this partitioning. I always use ext4.

Clonezilla is a marvelous tool and I heartily recommend it. In your post you mention external hard drives. The speed of the connection can make using Clonezilla slow or down right painful. This also depends on how much data you have in home. If you don't keep much in home Clonezilla is quicker, but you have to restore the drive to access the data.

A separate / and /home make it easy to image / with Clonezilla and use rsync or something else to backup /home in non compressed form that is easy to access.

The only disadvantage to separate / that I have found with Arch is that the partition can fill up faster than some other distros I have used. This is only a problem if you neglect the required arch maintenance. I know many people recommend separate boot partition, but I have never used that when installing mbr installs. UEFI, of course, requires an additional partition.

As long as you have good copy of /home, you can always reinstall /, if needed. Having a clonezilla image would be faster, but you can get back to original pretty quickly if you have a list of installed packages and some way to recall configuration changes you may have made. That can be a backup of /etc or notes to yourself.

While it might be possible to keep a clone of an older install on the same drive. It would be easier to do with a separate disk.

That's my two cents. Hope it helps.

1 points

My personal setup is EFI and /boot partition, then LUKS container with LVM and three logical volumes, one for /, one for /home and one for swap.

For me encryption is a must since I carry my laptop everyday in the bag. LVM allow to unlock two partitions at once (thus it's possible to do that without LVM using crypttab and a keyfile in root partition - never tried that) and also allow online resizing of root and home partition - I did that several times without pain.

For what concerns data (/home) backup I've used in the past three years an incremental backup on external disk using rsync and (hardlinks on ext4, until Mar 18 or snapshots on btrfs, since Mar 18). In this way you have a data history browsable without any tool and with very efficient memory management.

Also BTRFS snapshots can be used to create an instant snapshot of your root or home parition, in this way you can even boot an old system snapshot by changing bootloader launch options (eg from rootflags=subvol=current to rootflags=subvol=20181001) - I've tried this for testing but hopefully it never becomes necessary.

1 points

I go with really simple partitions for my arch install, and I back up most code/configs to a private github repository.

As for actual files, I run a duplicity script that archives, tars, and encrypts important directories and sends it off to my school's OneDrive storage (1TB), my personal gmail drive, and my laptop that runs all the time at home.

BTRFS won't really help in terms of saving your data, however it works really well for saving your ass on crooked updates and configurations after reboots and such. I ran into a system breaking GPU driver on my OpenSUSE tumbleweed laptop a long time ago and was able to recover using BTRFS's snapshot system that OpenSUSE utilizes by default.

If you have any more questions, you can ask me!

1 points
unknown author

Deleted before we saved it.

1 points

I recommend Btrfs. There are other solutions of course, but none that are as well integrated as Btrfs

You just need to make a Btrfs partition, mount it at /mnt, create a new subvolume for the root partition (e.g. /mnt/@) then make at least two more subvolimes for home and tmp. I recommend just making them @/home and @/tmp so that you don't need to list them in fstab (there are downsides but none of them apply to a simple setup and Btrfs is very flexible so you could always switch later)

Then you need to install snapper, create a config for root, install pac-snap to automatically snapshot before Pacman transactions, and then install grub-btrfs so you can boot into snapshots right from grub

1 points

I used to partition a lot, but now I just install everything on one big partition and use btrfs subvolumes to split things up. Life is so much easier now.

1 points

ZFS datasets for everything except UEFI partition. Boot environments for old system state.

1 points

ZFS datasets for everything except UEFI partition. Boot environments for old system state.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.