So I have a nearly full 4 TB hard drive in my server that I want to make an offline backup of. However, the only spare hard drives I have are a few 500 GB and 1 TB ones, so the entire contents will not fit all at once, but I do have enough total space for it. I also only have one USB hard drive dock so I can only plug in one hard drive at a time, and in any case I don’t want to do any sort of RAID 0 or striping because the hard drives are old and I don’t want a single one of them failing to make the entire backup unrecoverable.

I could just play digital Tetris and just manually copy over individual directories to each smaller drive until they fill up while mentally keeping track of which directories still need to be copied when I change drives, but I’m hoping for a more automatic and less error prone way. Ideally, I’d want something that can automatically begin copying the entire contents of a given drive or directory to a drive that isn’t big enough to fit everything, automatically round down to the last file that will fit in its entirety (I don’t want to split files between drives), and then wait for me to unplug the first drive and plug in another drive and specify a new mount point before continuing to copy the remaining files, using as many drives as necessary to copy everything.

Does anyone know of something that can accomplish all of this on a Linux system?

3 points

ZFS will let you setup a RAID like set of small volumes which mirror one larger volume, it takes some setup, but that’s the most “elegant” solution in that once it’s configured you only need to touch it when you add a volume to the system and it’s just a mounted filesystem that you use.

Does not solve the off-site problem, one fire and it’s all gone.

permalink
report
reply
1 point

It would also require all the secondary drives to be connected at all times, wouldn’t it?

permalink
report
parent
reply
2 points
*

If you are lucky enough, borgbackup could deduplicate and compress the data enough to fit a 1tb drive. Depending on the content of course, but it’s deduplication & compression is really insanely efficient for certain cases. (I have 3 devices with ~900GB each (so just shy of 3TB in total) which all gets stored in a ~400gb borgbackup)

permalink
report
reply
4 points
*

You’ll have ask the question of how important is this data, then before you start run drive diagnostic tool to see if all are functioning as expected, I’d suggest moving directories aposed to chopping anything up as to maintain some form of redundancy if a drive were to fail. It’ll be a long process. Hope it goes well

Resync is a handy tool

permalink
report
reply
6 points
*

Git annex can do that and keep track of which drive the files are on.

https://git-annex.branchable.com/

permalink
report
reply
2 points

Im going to say that doesnt exist and restoring from it would be a nightmare. You could cobble together a shell or python script that does that though.

You’re better off just getting a drive bay and plugging all the drives in at once as an LVM.

You could also do the opposite, which is split the 4TB into the different logical volumes. Each the same size as a drive.

permalink
report
reply
1 point

It wouldn’t be so complicated to restore as long as they keep full paths and don’t split up subdirectories. But yeah, sounds like they’d need a custom tool to examine their dirs and do a solve a series of knapsack problems.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

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

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

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

Community stats

  • 8.4K

    Monthly active users

  • 6.3K

    Posts

  • 173K

    Comments