Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Feb 28, 2015 5:23 pm 
Offline
Newbie
User avatar

Joined: Sat Feb 28, 2015 3:45 pm
Posts: 2
I keep a pair of linodes running as a production/replacement pair, that is, one server is built out as a new production system and after migrating production data from old to new, the old server is eventually built out as the next new production system and the cycle repeats.

That's all well & good. The issue is that I have an old 18GB filesystem (a retired production system) that I want to archive by copying to a local machine. I don't want to boot the old production system; I just want to copy the offline filesystem to local hardware so I can safely delete it from my linode instance.

If I was doing this with real hardware, I'd use dd on an unmounted disk partition then compress it into an archive, copy the compressed disk image to a different box, then delete the old partition from the original disk.

Again, this is easy with dd, bzip2, scp, and fdisk, and (as I've just discovered) you can use this method by mounting the old filesystem/partition on the new configuration as (say) /dev/xvde or some higher unused device. Reboot and it's accessible. If you have enough free disk space, you can mount /dev/xvde on /mnt, tar up the important stuff, copy this archive to local disk and safely delete all the stale data from Linode. Depending on how full the old filesystem was, this can save a lot of space and bandwidth over carting around large, sparsely-populated disk images.

On the other hand, if you don't have enough free disk space on a linode for that method, you can always ssh in and use rsync, dd, or tar to pipe a disk image or files back to your local machine, praying the connection doesn't drop.

Problematically, this method means you still have to tweak your running linode's configuration and reboot. This is not a huge deal if you're doing this on a secondary server as in my case, but as a mostly-ex-sysadmin I get twitchy about rebooting servers to make "small" configuration changes. I'm protective of my uptime... ;)

The pack rat in me wants to save the old data but keeping archive data on live servers is wasteful; it's a stupid use of shared resources, it slows down migration, and it can interfere with Linode upgrades since keeping inactive 32-bit instances around makes you ineligible for some free upgrades (incentivizing migration like this is absolute fricking genius BTW.)

Is there a (good) way of archiving a filesystem without rebooting?

PS: Yes, I solved my original problem midway through writing this but I'm still curious if there's a simpler, better way of doing what I'm trying to do.


Top
   
PostPosted: Sat Feb 28, 2015 5:52 pm 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
arclight wrote:
I'm protective of my uptime... ;)


You shouldn't be. In this day and age of constant patches, a high uptime doesn't mean you're a good sysadmin, it means you haven't patched recently.

My employer (large multinational) considers an uptime over something like 120 days to be a break and 180 days to be a critical one.


Top
   
PostPosted: Sat Feb 28, 2015 7:05 pm 
Offline
Newbie
User avatar

Joined: Sat Feb 28, 2015 3:45 pm
Posts: 2
glg wrote:
You shouldn't be. ...


I know, but to be fair, most updates today don't require a reboot. OS vendors & designers have done a pretty decent job of pushing stuff out of system space into user space where it can be patched without too much disruption.


Top
   
PostPosted: Sat Feb 28, 2015 11:47 pm 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 567
Website: http://www.mattnordhoff.com/
If you don't want to reboot and fool around with your node, I'd say create a new node and copy the disk image over to it via the manager. (You can do that without rebooting or shutting down.) Then you can deploy a minimal distro or boot up rescue mode and dd/tar/rsync/scp to your heart's content. As a bonus, if you need to, you can use a larger plan so you have enough disk space to tar everything or whatever.

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group