Go Back   nV News Forums > Linux Support Forums > General Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 10-06-07, 07:42 PM   #1
grey_1
Guest
 
Posts: n/a
Default PING

http://ping.windowsdream.com/

Has anyone used this utility? I'll hopefully be upgrading hdds in a month or so and really, really do not want to chance losing my current install/settings/data.

With this I can just make an iso to dvd to install to the new hdd.

TIA for any feedback or other suggested tools.
  Reply With Quote
Old 10-06-07, 08:16 PM   #2
evilghost
Registered User
 
Join Date: Jul 2005
Posts: 3,606
Default Re: PING

I just tar-gzip my home directory and or filesystem so I can pick and choose what I need. Never had a need to backup a partition since tar-gzip works fine. Had to restore from my backups multiple times on the server due to catastrophic drive failure. No issues with laptop use either or downgrading the wife's laptop from Feisty to Dapper.
evilghost is offline   Reply With Quote
Old 10-06-07, 08:45 PM   #3
grey_1
Guest
 
Posts: n/a
Default Re: PING

Thanks eg, so I would do just a clean install, extract the tarball and replace files/directories as needed?
  Reply With Quote
Old 10-06-07, 10:29 PM   #4
evilghost
Registered User
 
Join Date: Jul 2005
Posts: 3,606
Default Re: PING

Pretty much, except I do a clean install, boot to a live CD, 'rm -rf' any of the non-system directories (aka, leave /proc and /dev but nuke /var, /bin, /usr, etc) then do the tarball extraction.

I keep about 7 days of rolling backups on an external USB drive and then about every one week or so I'll sync the backup drive to another USB drive that is stored offsite. This strategy works for me and it's been tried and tested and was 100% successful with no data loss.

I like the idea of the tarball because if I make changes to a website and the changes are horrific or undesirable, I can easily extract that file and/or directory from the backup tarball and undo my changes.
evilghost is offline   Reply With Quote
Old 10-07-07, 03:21 AM   #5
grey_1
Guest
 
Posts: n/a
Default Re: PING

Sounds like plan. Thanks evilghost.
  Reply With Quote
Old 10-07-07, 07:46 AM   #6
evilghost
Registered User
 
Join Date: Jul 2005
Posts: 3,606
Default Re: PING

Here's the perl code I threw together to keep X days of backups, and here's the backup script I use on the server. I cron'd it in /etc/cron.daily

Cleanup
Code:
#!/usr/bin/perl

$popauthspool = "/backup/archives"; #Directory containing the files
$watcherlog = "/backup/backup_cleanup.log";

$date = localtime();

open(LOG,">>$watcherlog") || die("Can't open $watcherlog");
use File::stat;

@ips = `ls $popauthspool`;
foreach $ip (@ips) {
        chop($ip);
        $file = $popauthspool ."/". $ip;
        $s = stat($file) || die "Can't stat($file) $!\n";

        #1 day = 86400
        $modtime = $s->mtime + (86400 * 7);
        $now = time;
        if($modtime < $now){
                push(@expired,$ip);
        }
}

foreach $expired (@expired){
  $date = localtime();
  print LOG "$date - Removing $expired\n";
  unlink($popauthspool ."/". $expired);
}
close(LOG);
Backup Code
Code:
#!/bin/sh
/backup/backupcleanup.sh

echo "`date` Starting Backup" > /backup/backup.log

nice --adjustment=20 tar zcvpf /backup/archives/fullbackup-`/bin/date +%m-%d-%Y`.tgz --exclude=/FileServer --exclude=/backup/archives --exclude=/media --exclude=/home --exclude=/www_chroot --exclude=/sys --exclude=/rsync /
echo "`date` Full System Done" >> /backup/backup.log

nice --adjustment=20 tar zcvpf /backup/archives/home-`/bin/date +%m-%d-%Y`.tgz /home
echo "`date` Home Done" >> /backup/backup.log

nice --adjustment=20 tar zcvpf /backup/archives/www-`/bin/date +%m-%d-%Y`.tgz /www_chroot
echo "`date` WWW Done" >> /backup/backup.log

nice --adjustment=20 tar zcvpf /backup/archives/luser-`/bin/date +%m-%d-%Y`.tgz /home/luser
echo "`date` luser Done" >> /backup/backup.log

nice --adjustment=20 tar zcvpf /backup/archives/FileServer-`/bin/date +%m-%d-%Y`.tgz --exclude=/FileServer/Music /FileServer
echo "`date` FileServer Done" >> /backup/backup.log

nice --adjustment=20 tar zcvpf /backup/archives/rsync-`/bin/date +%m-%d-%Y`.tgz /rsync
echo "`date` rsync Done" >> /backup/backup.log

ssh root@192.168.1.254 -p 57600 -C 'dd if=/dev/mtdblock/1' > /backup/archives/openwrt_jffs2+squashfs-`/bin/date +%m-%d-%Y`.trx
ssh root@192.168.1.254 -p 57600 -C 'dd if=/dev/mtdblock/3' > /backup/archives/openwrt_nvram-`/bin/date +%m-%d-%Y`.bin
/bin/gzip /backup/archives/*.bin
/bin/gzip /backup/archives/*.trx
echo "`date` OpenWrt Done" >> /backup/backup.log

echo "`date` Backup Complete" >> /backup/backup.log

#Email report
echo "Subject: Backup Report" > /backup/email.log
df -h >> /backup/email.log
cat /backup/backup.log >> /backup/email.log
ls -lah /backup/archives >> /backup/email.log
cat /backup/email.log|sendmail myemail@mydomain.net
evilghost is offline   Reply With Quote
Old 10-07-07, 08:14 AM   #7
grey_1
Guest
 
Posts: n/a
Default Re: PING

Nice! Pun intended.

Wouldn't that tend to fill hdd space rather quickly if I'm changing files, dling etc? Or ...wait..I could cron.weekly or monthly, right? I've never used it before so I have much to catch up on.

Lol, having a good old time trying to make spamassassin do it's job in Slypheed for me, but that shouldn't take to long to figure out.

Absolutely loving this setup.

Edit: I don't leave my rig running 24/7....Do you think anacron would suit me better?
  Reply With Quote
Old 10-07-07, 08:17 AM   #8
evilghost
Registered User
 
Join Date: Jul 2005
Posts: 3,606
Default Re: PING

I backup to an external drive, 30GB, and can keep about 7 days worth. I only have about 5.6GB of used data. You can always --exclude directories you don't want to backup.
evilghost is offline   Reply With Quote

Old 10-07-07, 08:38 AM   #9
grey_1
Guest
 
Posts: n/a
Default Re: PING

Thanks Bro.
  Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lightning sucks!!!!!!!! exar General Hardware 3 08-23-02 07:50 PM

All times are GMT -5. The time now is 12:27 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.