cool... thanks.<br clear="all"><div>:-)~MIKE~(-:</div>
<br><br><div class="gmail_quote">On Sat, Jun 29, 2013 at 12:45 PM, Matt Graham <span dir="ltr"><<a href="mailto:danceswithcrows@usa.net" target="_blank">danceswithcrows@usa.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

> Brian Cluff wrote:<br>
>> In a nutshell, I hope you have a backup of it somewhere because if not,<br>
>> it's pretty much gone.<br>
<br>
MAKING BACKUPS EASY ON LINUX:<br>
<br>
0. Buy a USB2 disk that has enough space to hold all the stuff in your home<br>
dir plus at least a few G more (data tends to get bigger with time, of<br>
course)<br>
<br>
1. Plug this disk in.  Usually, removable disks have 1 partition of type FAT32<br>
or NTFS covering their whole space.  (Check that this is the case, if not,<br>
something weird may be going on.)<br>
<br>
2. Make a filesystem with a label on this partition.  "mke2fs -j -L MY_BACKUPS<br>
/dev/sdN1" .  Find what N is by looking at the output of dmesg | tail.<br>
<br>
3. Make an entry for the partition you made in your /etc/fstab :<br>
<br>
LABEL=MY_BACKUPS  /mnt/backup  ext3  noauto,users,noatime  0  0<br>
<br>
4. As root, mkdir /mnt/backup if it doesn't exist, then mount this partition<br>
on /mnt/backup , mkdir /mnt/backup/USER , and chown USER /mnt/backup/USER .<br>
<br>
5. Make a shell script sort of like this:<br>
<br>
#!/bin/bash<br>
if [[ $1 == '--help' || $1 == '-h' ]] ; then<br>
    echo "backs up ~USER to backup drive."<br>
    exit;<br>
fi<br>
<br>
if mount | grep /mnt/backup > /dev/null ; then<br>
    rsync -av --delete-after /home/USER/ /mnt/backup/USER<br>
else<br>
    echo "backup disk not mounted.  Trying to mount it."<br>
    mount /mnt/backup<br>
    if mount | grep /mnt/backup > /dev/null ; then<br>
         echo "Is the disk plugged in?  Can't mount, bailing."<br>
         exit 1<br>
    fi<br>
    rsync -av --delete-after /home/USER/ /mnt/backup/USER<br>
    umount /mnt/backup<br>
fi<br>
<br>
6. Any time you want to make a backup, plug your disk in, and run that shell<br>
script.  The initial rsync will take some time.  Subsequent rsyncs will take a<br>
couple of minutes.<br>
<br>
This is AFAICT a reasonably good way to do things, because it doesn't take a<br>
lot of time to keep your backup up to date, and restoring is as simple as<br>
mounting the backup disk and copying things over.  Since there is only 1<br>
backup, though, you could delete something, make a backup, then realize you<br>
needed that thing.  I have 2 backup disks and rotate them every few days to<br>
make that less likely.<br>
<br>
You could even get fancy and use dm-crypt to back up your stuff to an<br>
encrypted disk, which is useful in some situations like when you want to leave<br>
the disk somewhere that's not under your direct control like a friend's house.<br>
 Using dm-crypt makes things a bit more complex, but I can write another<br>
message about that.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Matt G / Dances With Crows<br>
The Crow202 Blog:  <a href="http://crow202.org/wordpress/" target="_blank">http://crow202.org/wordpress/</a><br>
There is no Darkness in Eternity/But only Light too dim for us to see<br>
<br>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
</font></span></blockquote></div><br>