Sponsored by Best Buy
Best Buy casts another employee in holiday campaign. view!
youtube.com/bestbuy0 - Jarice Brodie has done some cool things in his life. Next: Best Buy’s holiday campaign.
31 Comments
- waiwai, on 10/12/2007, -1/+9Wow, how could this person not know about rsync? Oo
- TomFoolery, on 10/12/2007, -1/+7Not nearly as tired as reading what Steve Jobs ate for lunch everyday but whatever.
Some of us actually enjoy getting useful information along with our news. - bsoric, on 10/12/2007, -0/+5Netcat's just another file transfer program in this case. Most distros already come with it installed, and it's faster than SAMBA (shudder) or SCP/SFTP.
- dolson, on 10/12/2007, -1/+6(Actually, you don't have to wipe anything down with Linux (at least not with debian). This isn't the Windows world.)
But yes, I totally agree with you. I should submit a "How To Double Click With Linux" tutorial and have it make the front page, when my news item about Ubuntu Studio only received just over a dozen Diggs...
Pretty stupid. - bsoric, on 10/12/2007, -0/+4The network is so much better than burning to CDs and writing to USBs.
You can easily transfer files between operating systems with Netcat, you just:
nc 192.168.0.2 4321 > file.zip
nc -vlp 4321 < file.zip - infl00p, on 10/12/2007, -0/+4No digg. The author hardly gives any info on what he is doing. And it's pretty dangerous also, because it works only on bash shells with net redirections enabled on compile. He is using slackware linux, so the article probably works only there. On all debian based distros, net redirections on bash are DISABLED.
Because many things can go wrong with this method I suggest a md5sum check of the tarball. - aThing, on 10/12/2007, -0/+2You can also use NFS.
- marthaphoebe, on 10/12/2007, -1/+3rysnc in a cron, does it for me
- cowboyjunkie, on 10/12/2007, -0/+2There is also rdiff_backup which does INCREMENTAL network backups. Think cvs.
You can revert any file, directory or the entire disk to a point in time, subject to the granularity of how often you run it. If you run it nightly, then you can revert to the version on any day at around the time you ran it.
Plus, you only transfer over the network the differences since the last backup ( /- a small admin overhead), which in many situations will save you a lot of disk space on the remote server, reduce the bandwidth and speed up the backup. And fully incremental, so you can revert to a particular version.
http://www.nongnu.org/rdiff-backup/
Which you can tunnel over ssh or not. There are full details at
http://arctic.org/~dean/rdiff-backup/unattended.html
Which also includes how to limit a password-less ssh key setup so that the remote ssh server only allows specific commands to be run (in this case, rdiff_backup) for improved security. - nealibob, on 10/12/2007, -0/+2Actually, Samba is pretty good. The fact that it is easily interoperable with Windows, Mac OS X, and other makes it valuable. SCP/SFTP is not viable for large backups because of the encryption overhead, unless the encryption is actually needed. Netcat is something I have not really played around with, and I'll have to look at it for a project I'm working on now.
- cazabam, on 10/12/2007, -0/+2My Slackware 10.2 box doesn't have net redirections enabled. Scarily, though, the author has written a bash patch to allow it to redirect incoming as well as outgoing network connections. Even more oddly, he does point out, briefly and with no explanation, that you can just use netcat instead of the bash stuff.
I must admit, there is a distinct air or 'WTF' about this article ... :-) - brianmost, on 10/12/2007, -0/+2rsync is the only way to fly.
Even if you have multiple large colo boxes, you can pull differentials down over a plain old DSL in a few minutes per machine and run a tar/gzip step locally. - bullium, on 10/12/2007, -0/+1Try ghost 4 unix or g4u http://www.feyrer.de/g4u/, I use it all the time works flawlessly. Still a good article though.
- 2bluesc, on 10/12/2007, -0/+1Why on god's green earth would you want to use netcat when there are things like ssh? Further more stuff like sftp/scp or rsync which all use private keys flawlessly... I think it'd be more work to screw with netcat once to script it then to use ssh once and be done.
- swaxhog, on 10/12/2007, -0/+1I've always liked mkCDrec for system image backups. It can store the result locally, as an .iso or to a network device. Doing a 7 day diff rsync is also a good idea for things that change often.
http://mkcdrec.sourceforge.net/ - gerkin, on 10/12/2007, -0/+1Interesting approach. There are many other/better ways. Read the added article comments for more approaches if you need to ;)
rsync+ssh ... not with just the the lame -av options that the one user posts though -- read the man page. The single filesystem boundary is a neat approach though. I've done this quick and dirty with mc many times as well over several types of transport depending on what was available.
digg++ - Swipe, on 10/12/2007, -1/+2yep, arseink all the way
- Izzie, on 10/12/2007, -0/+1check the backup section of howtoforge for how to do same but using rdiff-backup or systemimager:
http://www.howtoforge.com/taxonomy_menu/1/34 - inactive, on 10/12/2007, -0/+1tar -zcf - /home | ssh -C [username]@[backupmachine] "cat > home.tar.gz"
This achieves the exact same ends (i.e. streaming backup over the network), but is secure (SSL encryption). As others have said, mix this with key authentication (and keychain for "pseudo-passphaseless" operation), and Bob's your uncle. - mutt, on 10/12/2007, -2/+3nothing to see here, move along folks....
Personally, I'm rather sick of these types of articles. This is all in the man pages for both commands.
tar jcf - | ssh -lusername hostname "cat >filename.tar.gz" works with encryption
or, rsync.. or, rsh/rcp.. dump/restore even support stdout... this is *NIX, that is what it does.
Next weeks howto:
How to copy files to a floppy disk "USING STANDARD TOOLS!!!"
ok, i'm a prick. i'm actually annoyed that i read that article. in fact, i feel dumber for having read it. - PsycheRevolt, on 10/12/2007, -0/+1ummm its pretty easy to use rsync over a network...
- inactive, on 10/12/2007, -0/+0The UNIX world has had a free backup tool called AMANDA around for longer than the 12 years I've been aware of it. It will accomodate backup architectures from those with a single tape drive in a home environment to those in corporate datacenters with multiple robotic tape libraries.
http://www.amanda.org/ - usergentoo, on 10/12/2007, -1/+1Ive got a pretty nifty script. You just type backup in a terminal. This will backup the entire hard drive compress it add time ,date and a label to it, then sends it over to my file server. If you only want to back up home just type backup home.
- supernerd, on 10/12/2007, -0/+0I just setup rdiff_backup and strongly recommend it. I found it producing better results than rsync and preferred the incremental backups approach to that taken by rsync. It uses librsync so the technique is similar, however unlike rsync which copies entire files when doing incremental, rdiff_backup copies over a diff instead so for things like large binary files it is much more efficient on both bandwidth and space.
I also like how it can copy over everything including the timestamps, ACLU and ownership.
It works extremely well for things like remote backup as well as disk based backup (just like rsync). - JasonChase, on 10/12/2007, -0/+0Dirvish -- http://www.dirvish.org/
Dirvish is a fast, disk based, rotating network backup system.
With dirvish you can maintain a set of complete images of your filesystems with unattended creation and expiration. A dirvish backup vault is like a time machine for your data. - inactive, on 10/12/2007, -0/+0Depending on disk space available, you might not be able to tar up a large directory on the machine you are backing up. That's why a streaming solution, like the one in the article, may be better suited.
- kruhft, on 10/12/2007, -0/+0i didn't assume that everyone went out and applied my incoming connections patch, so i had to use netcat in my examples. i also showed how to only use netcat in the case that they might be disabled at compile time (as the parent stated). and i'm not sure how this could be 'dangerous', it was simply a little trick that i used to do a harddrive upgrade with a minimum of fuss and hoped that others might find it useful, in that it doesn't require installing new software and shows what you can do with a little bit of shell.
--
kruhft - mcadoar, on 10/12/2007, -2/+1I like the idea, but if I was going to do this, why wouldn't I simply put / into a tar file and copy it over with SFTP or SCP or SAMBA or whatever? I'm not sure why netcat is nessicary, especially if you're already using the backup server as a file server?
I'm digging this, because it's got that geek factor, but there's no need for netcat to do this. That's the nice thing about linux - files ain't "in use" just because they're running.
Tip to people reading this: Always put your real "data" (music/movies/pictures/documents/etc) in a seperate partition. This way, if the system crashes, then even if you have to reinstall Linux, your data is safe and you can just remount it. - kruhft, on 10/12/2007, -2/+0i do know about rsync, i just wanted to try an idea i had. it worked so i wrote about it.
--
kruhft - lavawalker, on 10/12/2007, -4/+2It's so geeky it's /sbin/ifconfig eth0
- tuna1, on 10/12/2007, -17/+12Anyone else sick of people submitting these 'how-to' linux articles for every little thing?
Just use seperate partitions and a CD-burner. It's good to wipe you / clean every now and then. Now, I'm off to be buried.


What is Digg?
Browsing Digg on your phone just got easier with our enhancements to the