Volume Shadow Copy For Linux?
An anonymous reader writes "I was asked to manage a number of Linux servers at work. I would like to use volume snapshots to improve my backup scripts and keep recent copies of data around for quick restore. I normally manage Windows servers and on those I would just use Microsoft's Volume Shadow Copy for this. I tried Linux LVM snapshots, but most of the servers I manage run regular partitions with ext3 file systems, so LVM snapshots will not work. I found some versioning file systems out there like ext3cow and Tux3. Those look interesting, but I need something I can use on my existing ext3 file systems. I also found the R1Soft Hot Copy command-line utility, but it does not yet support my older 2.4 Linux servers. What are you using to make snapshots on Linux?"
Nilfs will have those things, but you`ll have to wait till its production ready.
I tried Linux LVM snapshots, but most of the servers I manage run regular partitions with ext3 file systems, so LVM snapshots will not work.
Last time I checked they worked fine. I think you mean something else by "snapshots".
Linux servers don't get backed up, they only get migrated to new hardware every five years. (BSD is the same, except for the second part.)
You will have to migrate your servers with plain ext3 to LVM-based ext3. Short term pain for long term gain.
maybe rsnapshot (http://www.rsnapshot.org) will fit your bill...
Hey, IRC called, they want their asshole back.
"does not yet support my older 2.4 Linux servers"
So upgrade your servers to a supported release instead?
-- Terry
dd command? Works well for image snapshots for me, copys raw bit by bit
I use them on ext3 with no problems. It's true that very early on there was a problem with them and journaled filesystems, but that has long since been solved.
LVM snapshots work on a block level and don't care about the filesystem. A snapshot of any data in a logical volume should work fine, even if it's not a recognized filesystem.
A nice use for this is using a read/write snapshot to try different strategies for recovering a broken filesystem.
How many servers and what is the approximate amount of data that you need to backup?
Your asshole called, it wants the 1990's back.
I will admit that I have not tried it on Linux, but zfs is the best of the next gen filesystems. It does cryptographically assured reads and writes (remember that transitory undetected disk malfunctions occur at a rate of ~1/TB of data), it can snapshot changes, it fricken slices bread. If it had a gender, I would probably marry it (well, I guess I can date it for a while and see how things work out). http://zfs-fuse.net/
If people can connect to one another even the smallest of voices will grow loud.
--Serial Experiments Lain
It sounds like nilfs is more along the lines of what you're looking for, but something like rsnapshot might be useful to you.
http://www.cyberciti.biz/faq/linux-rsnapshot-backup-howto/ HowTo on setting it up on Debian/Ubuntu
It takes timed snapshots of the filesystem, so you'll only be able to roll back to the last snapshot.
RSnapshot uses a clever blend of rsync + hard links to do what you want... you can store many incremental backups in just a little more space than a full backup. you can run rsnapshot on a backup server with lots of disk space, and all you need to expose on your target machines is SSH.
you'd create "backup" users on all the target hosts, generate a PKI key pair, and put the private key on your backup server. put the public key in the "backup" account on each target machine so the backup server can securely login without a password. then you just set up rsnapshot to log into your targets and it will use rsync-over-ssh to pull the data.
http://rsnapshot.org/
Oh shit! I forgot to click "Post Anonymously"...
Since the situation is so hobbled (Old Linux kernel, no LVM) about the only thing you will be able to do is learn to use hardlinks. The ext* filesystems support them but you will have to manage them yourself (cp -varl /source/* /destination/version). Yeah it's a huge hack, but unless you can actually fix the problem, it's about your only hope.
... And so it comes to this.
If you have backups, then moving to LVM is obviously the way to go if you desire snapshots. The others options are short-term hackery, LVM was designed from the ground up to do such things. And Ext3 has nothing to do with the price of butter.
To clarify, let me rephrase your question for the other way around
"I was asked to manage a number of *Windows* servers at work. I would like to use volume snapshots to improve my backup scripts and keep recent copies of data around for quick restore. I tried Windows Shadow Copy, but most of the servers I manage run MBR partitions with FAT file systems, so Shadow Copy will not work. I found some versioning file systems out there... Those look interesting, but I need something I can use on my existing FAT file systems. I also found --random freeware--, but it does not yet support my older Windows NT 3.5 servers. What are you using to make snapshots on Windows?"
Except, in that case, it makes more sense because the filesystem is the determining factor, not the volume management. If you have LVM, it doesn't matter what the underlying filesystem is, really. Stop faffing about - if you have a server, with backups, that you need snapshots on, take the hit and wipe the drives to a config that supports that... while you're there upgrade that damn kernel already. If nothing else, it will test that the backups you're making are actually worth the effort. It's like complaining that 95 on FAT16 doesn't support Shadow Copy. If you absolutely *can't* take those servers down, or am unable to restore your backups to another machine for testing such changes (whether because of compatibility, software licensing and/or bad backups), you have bigger problems than some random desire for a feature you don't actually *need* at the moment.
Have you looked at rsnapshot?
It's based on this article:
http://www.mikerubel.org/computers/rsync_snapshots/
There are Enterprise Linux distributions that are both supported and still run 2.4, though not for much longer. Not everyone runs Ubuntu.
"I use a Mac because I'm just better than you are."
Most people just use rsync for backups. LVM is a lower level then the file system... you create a storage pool and then create filesystems on top of that. If you really want to use LVM snapshots you would have to recreate your filesystems, which I gather you would like to avoid. There are lots of options for filesystems that include versioning in some form or another. If you do want to choose one of these filesystems, find the Wikipedia article for any filesystem and down at the bottom will be a list of filesystems you can explore. If you just want to snapshot the entire partition, you can remount it readonly and use dd to copy the block device to a file (this will take up space for every byte, including unused space unless you compress it). I congratulate you on the opportunity to work in a unix environment. Please don't get discouraged because it is different, it really isn't that hard to learn, and many people would say it's easer. Google and Wikipedia will be indispensable.
Weee!
The more costly, but by far best, is to invest in a small netapp and point the data to it. Netapp has the best snapshot technology of any other out there. If you want whole OS, you can provision some iSCSI on the netapp box and iSCSI boot, and take advantage of snapshots on your OS.
Secondly, build up a solaris box with a large ZFS filesystem hanging off of it (which has snapshots), setup some NFS exports and do the same thing but using ZFS snapshot technology on the backend. Short of those two options, you are going to have to wait for the next-generation linux supportable local filesystems to mature a bit further. There are other options out there, but from my experience, none that don't wont suffer a significant performance hit with the technology. Netapp's filesystem doesn't have that penalty, and zfs doesn't have as bad of a penalty as others.
Knowing where to start on this is a bit of a miffing point.
First: upgrade your shit. 2.4 kernel systems? Are you running Redhat 6? You know, from the turn of the millennia.
Second: upgrade your shit. Really,
Third: if your kernels are that old and you're using these machines for file storage/backup, chances are the hardware needs to be replaced before you even consider considering messing with them. Seriously: this stuff is ancient. Even Debian hasn't had a 2.4 kernel in 5+ years, I think.
Third: you can do what you're trying to do with rsync 'snapshots'. It works very well, failing filesystem level support. If you're sharing data over samba, this makes it easy: just put a '.snapshot' dir for these 'temporary' backups in their $HOME and hide dotfiles. Then make sure rsync ignores .snapshot. (Of course, there are other ways to do this.)
rsync snapshots (and here).
There are other sources of information out ther on rsync snapshots. There's also rsnapshot.
Chances are you'll have to upgrade before this stuff even works for you, though.
~/ssh slashdot.org ssh: connect to host slashdot.org port 22: too many beers
People expect a snapshot to be immediately usable and reliable, however in practice a state of device, even if synchronized with filesystem through its transaction is not a state of all data -- some data may be in buffers, prepared to be written, and rebooting into a restored filesystem may require some cleanup of such state. In particular, SQL databases are completely unsuitable for this kind of backup (this is why they have their own backup and transaction log handling procedures), and database-like applications such as mail servers, may require reindexing.
However for purposes other than those applications, file-level backup is entirely adequate, so utilities like rdiff-backup end up providing more functionality than complicated snapshot-handling procedures -- incremental backups for subtrees, readable trees in backup media, etc.
It also should be noted that backups should not be used as a replacement of package management -- on Linux anything installed through a package manager can be uninstalled through it.
Contrary to the popular belief, there indeed is no God.
2.6 came out many years ago. It's hardly bleeding edge.
How's he being an "asshole"? LVM is exactly what the topic submitter needs. It's filesystem-independent, can work with existing filesystems, has been supported since the later releases of Linux 2.2, is well-tested in production environments, and has a very minimal performance impact.
I'm troubled why people still run 2.4 server. I remember the time when I was reluctant to upgrade to 2.6, and I used prefer the older 2.4, which felt more comfortable than 2.6, regardless of how tempting the new changes sounded. But now I don't see any reason I would run this anywhere, even my router runs 2.6. Especially on newer hardware, 2.4 is really really too old.
I know there are people who probably still run Linux 2.2, but that are probably systems that are running some task well enough to require any changes, and leaving them as they are is the best. Servers are usually not like that. They need security updates, upgrades to catch up with the times, and many other changes required by the circumstances (for example, adding snapshot abilities, for which some person asked recently on Slashdot). Most production servers are not systems that you just leave running, so upgrades to the kernel are also expected and highly recommended. Not to mention that most recent distributions require 2.6.
Take a look at rdiff-backup.
rdiff-backup backs up one directory to another, possibly over a network. The target directory ends up a copy of the source directory, but extra reverse diffs are stored in a special subdirectory of that target directory, so you can still recover files lost some time ago. The idea is to combine the best features of a mirror and an incremental backup. rdiff-backup also preserves subdirectories, hard links, dev files, permissions, uid/gid ownership, modification times, extended attributes, acls, and resource forks. Also, rdiff-backup can operate in a bandwidth efficient manner over a pipe, like rsync. Thus you can use rdiff-backup and ssh to securely back a hard drive up to a remote location, and only the differences will be transmitted. Finally, rdiff-backup is easy to use and settings have sensical defaults.
I can confirm that rdiff-backup is indeed easy to use.
Funny... I read this question while browsing /. during lunch. Next in line was Linux.com which had a link to an article on Next3: ext3 with snapshots.
Here it is: http://www.linux.com/news/software/developer/317784-next3-ext3-with-snapshots
Seriously, what is wrong with dump(8)? It works on ext3. I use it on FreeBSD. It takes snapshots to do the dump, so you can shutdown your database, start the dump and then immediately start your database again. Of course you have to backup the entire volume, but still...
Can you give us an example?
The obvious one is Redhat. RHEL 3 is the newest version to still use a 2.4 kernel. It may still be supportes, but that expires October of this year, so the OP should already be getting ready to upgrade.
Thankfully, Linux is not nearly as complicated as Windows. Every time I've messed with Volume Shadow Copy it's turned into a huge headache. Doing similar functions on Linux just work right out of the box. I'd suggest anything that uses rsync, or you could use rsync directly. I use rsync which can synchronize gigs of data over the network, and is smart enough to parse partial sections of files. It's amazing and very efficient. Windows has nothing that even touches this, that I know of.
In case you hadn't realized this, It is possible to tell people to migrate to LVM without calling them names.
Need a Python, C++, Unix, Linux develop
Just upgrade your kernel using a manual build of the 2.6 kernel.
Also install static versions of the modutils ( insmod, modprobe, etc )
Use an external ( a machine with decent software ) for this so your compile doesn't break.
I have done so in the past and it works fine. ( and plan an update for those machines, anything with 2.4 is way to old... )
After that you can just use R1Soft hot copy,
http://www.r1soft.com/tools/linux-hot-copy/
This program is free ( as in beer ) to download and works with every block device.
You can even write to a block device if you really need to.
Their commercial offerings are pretty good as good. ( and DO work with the 2.4 kernel )
We use it here at work.
I heard btrfs supports something like this as well.
Any way, good luck!
Dump the disks to a virtual image, virtualise the machines and then you can snapshot away to your hearts content. Be it via the virtualisation tech, or the host's file systems.
However, as already said, if you're still running 2.4 kernels, you're well over-due an upgrade/migration to newer software AND hardware environments. Why not combine both suggestions?
Understandably, uptime is really golden, but everyone understands that you have to upgrade and/or maintain systems at some point.
I'm troubled why people still run 2.4 server
They fit in well with his other servers, still running Windows 98 Advanced Server Edition.
But seriously, migrate to LVM already.
Money for nothing, pix for free
Works nicely. I use it for backups over the net. One very nice feature is that it does is reverse diffs, i.e. the nearer to the present time, the faster you get files restored. You also can remove older diffs without any fuss.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
Rsnapshot is great, but it does not create a point in time snapshot of the entire volume or filesystem like an LVM or filesystem snapshot will.
It may be enough for the OP's purposes (it's enough for mine), but it just ain't the same thing as Volume Shadow Copy.
Why does Linux still lack this functionality?
Since the early 1990's Novell has had the ability to "Salvage" deleted files and even maintained a near limitless amount of previous versions with a Copy On Write functionality. It still exists, even on Linux in their NSS(Novell Storage Services) Volumes.
Microsoft finally got on board when their Server 2003 product implemented Volume Shadow Copies. This isn't nearly as good as Novell's implementation but, it was better than anything Microsoft had previously offered.
The original poster did mention etx3cow, which offers an awesome feature set. But, etx3cow has been "under development" for a long time without ever catching on.
Ext4 has recently been incorporated into the Linux kernel and there just isn't any excuse for its lack of a Copy On Write version history. Yet here we are, in 2010, yet again answering this question without any good answer. Linux should have a standard Copy On Write file system a long time ago. Its continued absence is shameful.
ext3cow should be merged into ext4 yesterday!
http://www.symantec.com/business/storage-foundation-basic
Is this article posted by an employee,
of R1Soft?
ZFS and BTRFS, btrfs is included with Fedora 13 (maybe 12 too).
ZFS is found here http://wiki.github.com/behlendorf/zfs/
I am the unwilling control for my Origin.
Isn't there some upgrade path to convert "old" partitions to LVM partition? Just like windows supports upgrading to dynamic partitions and FAT32 -> NTFS conversions.
Yes, you always need a backup, but having a backup + doing inplace upgrade is far more convinient.
that's not as much fun.
Do you even lift?
These aren't the 'roids you're looking for.
http://www.advsyscon.com/products/rso/
Handles OPENVMS and UNIX
Every time I've messed with Volume Shadow Copy it's turned into a huge headache. Doing similar functions on Linux just work right out of the box.
What are you talking about? Volume Shadow Copy(VSC) is a simple checkbox to enable it and it works! Two snapshots per day by default. Users can restore previous versions directly from their workstations with a right click, select, OK. Or, with newer versions of Windows, drag the desired version from the VSC window to where ever you want it. How is that complicated? How could you screw that up?
Meanwhile, on Linux... Write a bash script with arcane rsync arguments, create a cron job for the script, ??? Does it work as desired/expected or do you have to debug your script, cronjob, permissions? Where are the backups? How do you restore them? How do you maintain permissions and access control, especially with users that are not working local to the machine?
Here's some more information for the deluded. Windows has it's own kind of rsync. It's called Robocopy and it does almost all of what rsync does, including maintaining Windows user information and ACLs, an area where rsync fails miserably in Windows environments. But, the built in Windows features like VSC and Distributed File System(DFS) replication make the use of rsync/robocopy painful, pointless and superfluous.
If a single checkbox is a headache for you, I don't see how rsync can possibly be less so.
I have scrolled to the bottem and replied after a scrolling skim. No answers for this guy yet? Just vague debate. No "use either a,b,c,d,or e".
Thats telling.
I am in this guys situation at work.
In post Patriot Act America, the library books scan you.
why not use "dd" it is already installed
"I don't pitch OpenSUSE Linux to my friends, i let Microsoft do it for me
This is clearly the definitive answer for this article.
We can all stop posting now.
There are Enterprise Linux distributions that are both supported and still run 2.4, though not for much longer. Not everyone runs Ubuntu.
I'm sure most do not run Ubuntu. I work for a very large company and we only use RHEL and SuSE on physical hardware and mainframe LPAR.
Volume shadow copy might not be doing what you think it is. I know it makes a big file, but restoring a snapshot has never worked as expected.
It sounds like you are just trying to keep an old dinosaur alive. Reboot with a live cd and make a snapshot of the old dog.
dd if=/dev/hda conv=sync,noerror bs=64K | gzip -c > /mnt/sda1/hda.img.gz
That applies to Windows partitions too. It's faster and more reliable *restore* than Volume Shadow Copy on identical hardware. You can also move the Old Dog onto somewhat newer hardware.
gunzip -c /mnt/sda1/hda.img.gz | dd of=/dev/hda conv=sync,noerror bs=64K
You will need to check the disk (fsck) before booting the restored partition.
If you have a say in your priorities, it's time to migrate the services off the Old Dinosaur onto another server with an LVM disk and vaguely modern distro.
http://www.maxineudall.com/2010/02/should-economists-be-sued-for-malpractice.html
Perhaps you are making this more complex than it has to be. I've had zero success simply copying the files and filesystems from a Windows server to backup and then being able to restore anything but data -- you can't reinstall a Windows OS from the moral equivalent of a Linux "cp -R" command. Linux, however, does not share this feature. You can -- and I have -- use rsync or tar to copy the entire filesystem off of a Linux machine to your backup device, then restore an entire machine -- data and OS. The only caveat is that you will need to partition the disk on the replacement machine to match the partitions on the original machine, or else you will need to modify /etc/fstab to reflect the new partitioning scheme.
/backup directory. Then on the servers you manage, have them run "rsync -av / rsync://rsyncserver.example.com/backup/rsyncclient.example.com/" (where you replace "rsyncserver.example.com" with the name or IP address of your rsync server and "rsyncclient.example.com" with the name of the client you are trying to back up).
So what I do is build a backup server with a huge disk array, big enough for all the data on all the machines you manage, or at least for all the machines you want to write to this backup server. Configure rsync.conf to have a
MCSE? No, sir...I don't do Windows. Yes, I am an idealist. What's your point?
dd if=/dev/hda | ssh your@mamma.edu "dd of=/abc/remote_hd_image.iso"
With judicious use of --link-dest rsync can do this for you without having to use cp at all.
http://rsnapshot.org/
Our thumper has 32.5GB alonep>
Did you mean 32.5TB, not GB?
"Can of worms? The can is open... the worms are everywhere."
Indeed. I've done so, and documented it:
http://www.tolaris.com/2010/05/06/moving-an-existing-backuppc-partition-to-lvm/
People smarter than me documented a way to move the data, live, even when the partition is nearly full. See the comments there.
*** I also found the R1Soft Hot Copy command-line utility, but it does not yet support my older 2.4 Linux servers. ***
How about updating to 2.6+?
There is no such thing. Windows locks files when it opens them, so nothing can touch it. Linux do not do that. Rsnapshot is your friend.
This might be a bit extreme and would require some infrastructure re-org, but you could use virtualization with VMWare ESXi or XenServer to snapshot your entire box. The software is free and the scheduling is pretty robust. It doesn’t directly help with the restore of individual files, but hell, you could restore entire servers independent of your production servers and pull the files that require restoration. I know, it’s a pretty roundabout solution, but, of course, server virtualization provides all kinds of other benefits beyond this. Plus, it wouldn’t matter what kernel you’re running.
Reading through this thread has brought back the memories of when I first started using Linux. There is a subset of Linux users who seem to think that acting like a giant douche bag will help people adopt the platform.
Don't get me wrong, I've found that there are some amazing people in the Linux community that are more than willing to help out someone genuinely willing to learn, but there still exists this subset of assholes that seem to think ridicule, and basically acting like a dickhead makes them superior. If you're one of those people get over yourself. Linux would be better off without you!
ZFS is available as a user space filesystem (FUSE) and has lots of goodies including snapshots and snapshot replication for off-box disk-to-disk backup. It's got a much better feature set than LVM/ext3. I've used it and it seems stable - I've even imported and exported Zpools between Linux and Solaris without problems.
You can try to build it from source if not available for all your distros - not sure if it will compile on the 2.4 kernels though.
You are not going to find something you can 'drop on top of' a bare EXT3 filesystem and get robust, modern features like snapshots w/o some data migration.
You could also think about migrating these old physical servers into VMs and snapshot using the facilities available in the hypervisor (eg VMware or Xen).
You could also setup an NFS server or a NAS box with snapshots and migrate your data there, leaving the OS/apps to run via NFS mounts: OpenSolaris has NFS; Nexentastor, built on OpenSolaris, is free for up to 3TB and has ZFS/snapshots/etc, or you could deploy a Linux machine with BTRFS, etc.
LVM snapshots suck because you can't store the snapshot data on the filesystem you're snapshotting. Sure, there's tons of ways to come up with extra space to store the snapshot data in, but they're all gigantic pains in the ass.
All it needs is the ability to exclude particular blocks from the snapshot, which should be a ridiculously easy option to implement for anyone who's worked on the snapshot code, and then people who aren't experts in kernel hacking can take care of the rest of the layers to make it a user-friendly operation, but nobody will do that because of hurf durfy crap that doesn't account for how people actually use computers.
<xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
Depending on how long you're keeping them around, LVM Snapshots are likely to be a bad choice anyway. Their intended use-case is to have a very short lifespan, because they're intended to be used like so:
1. Create snapshot
2. Mount snapshot & copy data to backup server
3. Unmount & destroy snapshot
The point behind them is to create an unchanging version of a live partition so that you can copy the data out without worrying about whether it is being updated while you copy. Since the snapshots keep a diff of all changes to the original volume, they continue to grow in size as you make changes to the original volume. When the snapshot runs out of space, it simply dies (completely... can't mount it or anything, just have to destroy it).
There are some other possibly valid use-cases (e.g., if you have simple throw-away virtual test machines, you can build a gold image, and snapshot it and then mount & use the snapshot, which allows for a quick restore to the gold state), but keeping iterative backup copies on the local volume for quick restoration isn't really the best idea.
You can shadow a file, drive, whatever with dd.
'dd if=/volumeaddress of=/whereverYouWantIT/shadowedfile'
Just be very careful when you want to restore the volume, because 'dd if=/whereveritwas/shadowfile of=/' will f-up your partition so bad that you'll have to reinstall everything.
Quoth Wikipedia:
4 January 2001 - Linux 2.4.0 was released (3,377,902 lines of code).
That's about the same as running Windows 2000 Server in a production environment.
We have our linux systems SAN and NAS attached to EMC and NetApp arrays respectively. We take snaps from the storage array.
*sigh* noobs...
$ man tar
+1.
u r doing it rong.
If you need to keep around such old software, it needs to be running inside Xen/VirtualBox and/or become NFS-booted so that it's insulated from the hardware. That way, you're not forced to keep around old hardware to run your old software. If you insulate with Xen/VBox at the block level you can use LVM2 on the host system to do snapshots but are still constrained by the legacy filesystem. If you NFS-boot, you can use future filesystem-level snapshottable Linux filesystems to do snapshots, or you could buy a NetApp and use proprietary software to do the snapshots, or Solaris (if it sticks around), or any of a variety of things. You can argue about which level of storage insulation is best in the long run: the filesystem level has certain advantages at least with ZFS and probably with whatever future Linux snapshotting filesystem comes along becuase of variable block size: small files get blocks in 512-byte increments, and any file larger than 128kB gets a multiple-of-128kB sized block. Since blocks are the unit of compression and deduplication, you want the largest size block possible, but not too large or you suffer from the read-modify-write RAID5-like tax. A larger block will compress better and takes only one entry in the deduplication hash table. If you insulate at the block layer then all blocks will have to be the same size and a relatively small size, which makes compression and dedup work not nearly as well because they can't give big blocks to big files. however for old software you may want to change as little as possible, and especially with sketchy linux 2.4 NFS clients maybe it's not safe to run certain apps over an NFS root, or maybe your ancient distribution doesn't support NFS booting well.
One way or another, though, you need to find a way to keep the apps running while minimizing the blocks of ancient code on which you're still dependent, and this should be your overriding concern. You need to structure your plans to encapsulate the code subject to bit-rot rather than flailing around on /. for some freshmeat app-of-the-day that claims to solve * with FUSE and some stupid Perl script. This is the difference between a serious professional douchebag who surveys the industry and can smell the difference between high and low quality, and a pathetic flailing do-my-homework-for-me everything-inclding-windows-has-stengths-and-weaknesses-right-tool-for-the-job doomed blinking medicated idiot douchebag. Do not be that douchebag.
Easy on the language...
But LVM is *the* solution on Linux. It's not very difficult to set up, and is very stable. As an additional bonus it supports all file system types (as long as they can exist on LVM volumes).
The 2.4 series was the last stable series of linux kernels in existence. 2.6 is in a perpetual state of bleeding edge, which makes it a gable to use on a system you care about. It is one of the reasons people (like myself) switched from 2.4 to one of the BSD's.
fdisk, mke2fs, mount, tar -zxvf, ...
fsckin' old skewl.
Configurations
Data
OS
/root) System. System Configs: This is /etc/ and key entries in /var for the most part.
/etc/ a copy of key data, and either a kickstart file, dpkg list or other tool (Like a wiki plan) to re-build the box.
Configurations: Two types Users Configs: this is kept in their home so no need to worry aboutthat as normal backup takes care of it (exception can be
Data: By in large this is also maintained in homes, for that too backup software is the key. Data could also include software that either you made the mistake of building locally without some kind of packaging to repeat, or, that is 3rd party. Scripts and Cron Jobs also fall into this realm along with logs.
OS: That's why they make CD's. You just install. To make sure you get all of the same software, both rpm based, and deb based systems have ways of taking an inventory and replicating the inventory to another box.
There is no concept of registry in a Linux box. (unless you run some of the newer gnomes but that registery is by user so it's in the home.) This means you don't have to have restoreable clones to re-create the box. It's sufficient to have a copy of
On the cheap tar and gzip are all the tools needed. More involved. Puppet
I'm sorry, I'm to tired to be witty at the moment so this message will have to do.
"but nobody will do that because of hurf durfy crap that doesn't account for how people actually use computers."
As long as they are using them *improperly* I wouldn't give a damn.
Hey, please, answer a question: how is it possible to get a filesystem-included snapshot for a full partition? Or is it that you must somehow reserve enough space for the snapshot to happen? And once you need to reserve such space, what's the difference between reserving it within the partition or out from the partition?
I tried figuring out how to do something like this a couple months ago: got something going with BTRFS. http://unquietwiki.blogspot.com/2010/03/quick-local-backup-with-rsync-btrfs.html
Life is irony, and nothing ever goes as planned.
Win2k is still used widely all over the world in production environments.
The problem with systems that work is that you're usually not to touch them until they stop working :(
Ext3 on LVM2
Seriously, that's all you need. Why overcomplicate things?
btrfs will have this in a few years... when it's reliable.
ZFS has it now if you choose to run OpenSolaris or FreeBSD.
Explain why not wanting to reserve space for snapshots is using a computer improperly, because that's a pretty major claim given that nearly every filesystem that supports snapshots doesn't require reserving space for them at filesystem creation time, and a number of block-level systems support it as well.
I can't parse your first question. Your second question makes no sense either. I don't want to reserve space inside the partition, I want to use space in the filesystem.
It's dumb, there's no reason for it other than a dogmatic clinging to some "right" way to do things. Not every system that needs to be snapshotted is a server with years of usage history and hot-swappable disks owned by a company that can afford to oversize their disks by 50% or more.
<xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
Even if you are using SUSE or RHEL, support for 2.4 is about to vanish completely. The last version of RHEL to use a 2.4 kernel was RHEL3 - which goes EOL October this year. I actually have one very old system to convert because of this. There is no version of SUSE using a 2.4 kernel and still in general or extended support. Even for 'self-support' (it's a bit of an oxymoron - it just means you can use the forums and the knowledge base but nothing is going to get fixed by Novell. How this is different from 'Googling it' isn't obvious to me), the last SUSE support for 2.4 will EOL in November 2012.
The way those filesystems do it is that they implement an allocator of resources beneath the actual "filesystem", so that you can snapshot things by marking blocks CoW and then allocating non-filesystem space for the metadata.
As it happens, ext and friends don't roll that way, so adding that functionality breaks compatibility with those filesystems.
Also, most of the new filesystems which allow snapshots in the way I describe have some awesome problems - like needing to truncate a file in order to rm when the filesystem is full, because the way the allocator structure works means that you can't know ahead of time how much space it takes to atomically delete a file, either...
It's only an insult if it's not true.
The whole point of VSS and similar snapshotting services is to reliably make consistent snapshots of live systems - you don't want downtime for your production servers!
Maybe rbackup would be useful? You can retrieve individual files, and data transfer/storage are reduced so you can back up more often.
I'm not reading all of this crap, but there are plenty of methods for storing/restoring data that DON'T involve making backups. Here's a few:
Use dar (search for "dar disk archive" so you don't get daughters of the american revolution)
- dar allows you to get many of the features that snapshots provide by simply backing up files to disk. It supports incremental backups, and supports deleting files on a backups so when you restore from a dar backup it really does restore a given directory to it's state when the backup was made. It's also extremely complex, so you will probably end up writing scripts to automate using it.
Other Options:
-You can also use tar, but it's not as versatile, and only sort-of supports incremental backups, you could probably hack around this by scripting the capabilities yourself, but it's much simpler to use dar instead.
-Use dump/restore (I haven't done this, and this method of backing up is OLD so there may be limitations that make it unusable in this context)
-Use dd to clone partitions/disks to image files, takes a long time and creates huge files, requires harddisks with identical geometry for a restore. (well, not quite, but it makes it alot easier)
There's also some client/server stuff like bacula and amanda, but I don't use them, it seems like much more work than is neccessary. Personally I just do dar backups to an external harddrive (or nfs-mounted share)
suso-- reread it with the assumption he isnt an idiot, you're making an implicit assumption about how he has his servers partitioned.
ok for most of what needs to be done Rsnapshot is awesome.
Rsnapshot uses rsync and some creative hardlinking to make a pretty nice snapshot. I find that it is awesome, until you need to transfer the archives to a new machine. It is packaged, so it installs nicely. If you have live databases you have to get trickier,, one simple way is breaking a raid 1 mirror, and running rsnapshot on the old drive.
just kidding.. the rebuild would jack your system up. And that assumes that you have the machines in raid. For live data that needs atomic control rsnapshot is really the wrong tool.
Storm
Heh. I still have both in production -- I sometimes wish I didn't, but the feeling passes when I think about how much mess it is to replace them.
(In fact, I still have an NT 4.0 machine and a linux machine with a 2.3 kernel on it; 'tho I'm surprised their hard drives still work -- SCSI for the win.)
Exactly, about 2 1/2 years ago I worked for a large company that everyone here has heard of that at the time was running ~4000 servers on a modified Redhat 6.2 image. There was a large code base that got lost sometime in the start-up phase of the mid 90s that was much easier to never touch the OS then to re-write the code.
Paying taxes to buy civilization is like paying a hooker to buy love.
Maybe your budget is zero, but backups in a work environment should be important.
OK a SAN costs money, but it will work with your ancient 2.4 kernels. Snapshot with ease and power. Add a few terabytes without powering off your systems. Plus you can do a lot of things like synchronous replication (for more $$$) and/or clustering. Virtualization is orthogonal, doing both might be a very good idea since you might manage not to change anything at all in the production systems.
I love it when all the supported filesystems also work as well
If you don't wanto to switch to LVM, whatever the reason, you need to hack a lot around ext3 to use some form of snapshot technlogy. But to do what? I mean, you need to "keep recent copies of data around for quick restore"? Use rsync, or rsync+git. I used snapshots, and they are a lot more useful as "pristine" image to install new systems, than as daily/weekly backups, not to mention that they are usually a lot bigger than "delta" based backup systems (amanda, just to say one). So, IMHO, you are looking for something you really don't need.
It's already been mention, but I'd be looking at snapshots in the array and/or, if your pockets are deep enough, VxFS. Host overheads drop when you're snapshotting in the array (assuming COFW isn't too onerous.) Once you're in the array though, you're operating at the block level (i.e. below any application or filesystem.) Your challenge here is to ensure your snapshots contain useful data and not an arbitrary bunch of 1s and 0s. If you're dealing with file server data, normal snapshots are generally fine. If you're running an app (e.g. Oracle,) then you must quiesce the app before taking a snapshot. If you don't, then your snapshot will be crash consistent. If you quiesce the app, your snapshot will be application consistent. There is a world of difference between the two.
If you use --link-dest=DIR, rsync will hard link to any files that are identical, so you can have snapshots that are accessible as an entire tree but that consume little more space that a snapshot delta.
Not sure it answers the OP needs, but a short googling returns :
Back In Time
DéjaDup
TimeVault (not maintained anymore it seems)
Some of our systems still use token ring coax networks and OpenVMS servers.
The problem is that the fuckers just work... and keep on chugging along happily in the basement of the plant...
I tried Linux LVM snapshots, but most of the servers I manage run regular partitions with ext3 file systems, so LVM snapshots will not work
Of course they will! Just fsck the snapshot and mount it read only if needed, it works perfectly well. We back up Oracle databases this way and have never encountered a problem restoring them.
Just stick an external drive on and use rdiff-backup. Been working great for me for years.
http://www.nongnu.org/rdiff-backup/
Use it for both Linux and Windows. On-line backup works like a charm.
New article here on _Next3: Ext3 with snapshots_ http://www.h-online.com/open/news/item/Next3-Ext3-with-snapshots-1020107.html on adding snapshots to EXT3 file systems.
More is here too: http://lwn.net/Articles/387231/
Perhaps the best article is on sourceforge - http://sourceforge.net/apps/mediawiki/next3/index.php?title=FAQ#Is_Next3_related_to_Ext3cow.3F
I work for a government agency and we currently have no disaster recovery full system restore solution for our Linux servers on IBM P-Series BUT we do have file level backups via IBM's Tivoli Storage Manager product. It would be similar to VSC except you'd invoke it using a command and tell it which file/directories to restore. I'm not sure if you have a budget for this but you may want to look for alternatives to TSM (Tivoli Storage Manager).
Seems like everyone on here has very little experience in an enterprise environment, where end users require quick restoration of their files when they call up complaining they deleted their last months worth of work.
Is it possible to switch to something like Solaris, where you can take snapshots? Although a very expensive alternative AIX v6 provides the new ability to snapshot a specific volume group which can be scripted.
Another option is to look into Amanda, maybe called zAmanda now or something obscure, it's a backup solution for the *NIX(es), it supports virtual tape, so you in effect could install it locally and have a separate disk available to backup the primary volume group/drive, with that you could easily run backups for only changed files periodically through the day. Obviously every minute running a script to scan for changed files with severely affect performance... UNLESS these are just little file servers or DNS and such. With Amanda it saves files as tar and other popular file formats (I think bzip), so you could in effect just extract a single file from the tarball with a script which accepts input.
Good luck, with less and less money we've had to make more from less, as long as you could spend some time you can figure it out.
Which makes me think, if you had an available disk, even a SAN attached disk, gave it to the linux server and made periodic copies of the files that people change most often or are most worried about it would be as simple as scripting a cp, or mv, or even scp to a remote location, you would have to script some sort of front end for any end user but an Adminstrator worth his/her salt should be able to figure it out.
Have fun!
Most modern Linux distros either use LVM by default, or offer it as an option during install. They also don't use 2.4 kernels. This is like saying "I can do this on Windows 2003 and 2008, let me shoehorn some other solution onto Windows 2000 and Windows NT to do the same thing, and oh, by the way, some of my filesystems ate FAT32." I think that's just as unrelaistic an expectation as searching for a panacea which will give you snapshots like VSS and VSC do. It has been my experience that there is very little actual reason for keeping an old crusty Linux box going. The system requirements of a console-only (no X) system have not changed all that much. You can run the latest versions on the same hardware you used to run the older ones on. I just finished putting Ubuntu Server 10.04 on a server I bought for less than $150.00, and I expect ti to do everything I need. Maybe your experience will be different. Maybe your Linux boxes are running a lot of custom, hand compiled software, or home-grown admin tools, but if you are a Linux novice, then perhaps biting the bullet and getting that stuff out of your environment should be a priority anyway, as it is most likely will be impossible for you to support when something goes wrong.
You could always virtualize and snapshot while up and running.
Myself, I would just use rsync or rdiff-backup depending on whether I wanted version control or not. If live backups of something like a database are needed, there are better ways.
Assuming the current situation : I don't see a lot of benefits of backing up the OS partitions. You'd better backup any config file that requires a lot of work to restore or version them using cvs/svn repository. If you are very hectic to backup You use rsync considering its mysterious options... Recommendations : - Better migrate your systems to latest supported versions. - Better use lvm for better manageability and more flexibility... Regards,
If it ain't broken, don't fix it.
What a depressingly stupid machine.
>Not everyone runs Ubuntu.
But Fedora, Mandriva, PClinux, SUSE, etc., even Slackware all distribute 2.6 kernels now and have for some time. The fact that support for 2.4 is in it's last throes doesn't appear to be a reason to actively resist upgrading.
He's probably not even allowed to install security updates without filling out three change request forms and waiting a month for final approval.
Damping absorbs vibrations. Dampening is caused by moisture.
The whole point of VSS and similar snapshotting services is to reliably make consistent snapshots of live systems
1. the old dog he's trying to snapshot doesn't have an lvm. A shutdown is probably required.
2. My claim is vss doesn't work quite like Microsoft's promises. (is anyone surprised?)
3. What's with the uptime obsession? If we're talking about an old dog that's *got* to be up 24/7, then way more time and effort needs to go into it.
VM is the closest thing to what you want to do in practice. Create a virtual server. Snapshot it using the VM tools. End of story.
In case you hadn't realized this, It is possible to tell people to migrate to LVM without calling them names.
asshole.
It is a perfect timing to be asking this question. CTERA has just announced Next3 this week (http://lwn.net/Articles/391339/) and Next3 is available (for kernel 2.6). Next3 was designed for this exact purpose: providing Volume Shadow Copies over Ext3. Next3 snapshots are instantaneous and have small performance overhead. With CTERA NAS appliances, Windows clients can actually use the "Previous versions" button to view file history, just as easy as with a Windows file server. Next3 does not try to compete with Btrfs (or ZFS), it is but a complementary feature for Ext3, which people do seem to find missing and will hopefully be merged also into Ext4 some day.
Unfortunately EXT type of file systems do not support this as others have posted about there are many other ways to do back ups. You might want to look at BTFS it is still experiential at this time but it have many cool features built in that I think you are looking for http://en.wikipedia.org/wiki/Btrfs
Circa 1980 or so. It's depressing really, how far behind most people are. The really depressing thing is they continually insist they have a clue what they're doing and others have to do it their way too. Then they have an epiphany and re-invent the wheel, all over again, but this time in Ruby (with added expressivity) so it's not really the same thing at all.
Deleted
Seriously. Problem solved. You could even shock horror, do it properly and take the backups offsite in case someone spills his Mountain Dew on the "mission critical" servers under his desk.
No, wait. It's much better to spend your time re-inventing backups. Go ahead.
Deleted
XFS + lvm work as expected.
They know each other, creating and removing snapshots is really simple.
Having an ancient kernel and complaining about missing features is just plain stupid
...stuff:
exactly on this, and excellent.
A Geek's Geek.
http://www.google.com/search?q=%22james+hamilton%22+%22internet+scale%22
2.4 is too old? I'm working on re-setting up a system for my dad's florist shop for the "recipe" for each floral arrangement. The thing runs Red Hat 7--kernel 2.2.
The program is written in COBOL, for crying out loud! I tried installing Ubuntu Lucid and chrooting to the Red Hat partition, but that ultimately failed, so now I have to try installing Red Hat 7 and see if it works better that way.
if you want vss the only place you are going to get it is under windows
windows + vmware server + vss = solution
linux is too disparate and unorganized - there is too much disconnection between projects, only a small sense of how things should really work
microsoft has an operating system that with all the administration tools built into the system makes for a far superior operating system for the enterprise
Running ext3 on raw partitions really gives you no latitude for snapshots... but why do you need them?
The conventional wisdom for snapshotting is to create a consistent point in time view of an FS. This is something thats often needed for things like db's. for example, if your running a db, you want all your db files snapshotted at the same point in time (ignoring logging for now) simply for consistency. This is where the rsync ideas fall on their bum, because rsync just wont happen fast enough to create a consistent point in time across the entire database and you end up with a corrupt db. As has been pointed out though, snapshots are NOT necessarily safe ways of backing up database data, the database should be aware of what your trying to do (see hot backup) and most can be made to do just that.
But then again, if you can rsync, you can backup (and typically thats a better idea anyways) - i.e. see bacula, etc. Rsync has its uses, but a backup tool it often is not.
There is one caveat, if you running on a SAN then there is no SAN (that i know of) that doesn't do snap-shotting in this day and age (though, in some cases it comes at a $ cost). Even just about every iscsi san does it.
Your only other option is to be migrating into LVM (see caveat below). IMHO, this is the best idea cause lvm doesnt just give you snap-shotting, it gives you much more besides in terms of flexibility.
Option 3 (and this ones a tough one) is to migrate into DRBD (or LVM is going to support dm-replication soon). But, you can migrate to DRBD now without too much effort (even in 2.4 iirc), and this would allow you to replicate ext3 data to another host running lvm where you CAN snapshot. But, as i said before i think your best choice is to migrate into lvm (drbd will cost you more in terms of sheer volume of work and drbd is not fun at the best of times).
"nearly every filesystem that supports snapshots doesn't require reserving space for them at filesystem creation time"
I don't think the guy wants to switch filesystems: "but I need something I can use on my existing ext3 file systems"
Possibly you could use drbd to clone disks elsewhere then build LVM on top of that to take snapshots. This might be considered a bit overly redundant if you've already got a disaster recovery / high availability system.
This is exactly the point. 2.6 is bleeding edge, it is not for production servers. You don't get it if you run something as critical as a router on Linux. Juniper chose BSD for JuneOS for a reason.
First of all, it's JunOS, not JuneOS. Second of all, companies like F5 (also very reputable) switched from BSD *to* Linux. Cisco's highend shit runs on QNX for that matter.
However in the case of *all* of these platforms, they're all just being used for management, all of the switching and routing is done by ASICs...
Ogre Wedding Planners llc.