Slackware Backup tutorial
Can anyone help me with a step by step backup method of my running system. I cant turn it off for backups and I am having a hard time with the answers on the forums. They assume I already have certain knowledge that I dont.
I have a slave drive installed and would like to use it as a replacement in case the master fails. Thanks in advance. Fevel |
Tell us a bit more about what you want to backup.
If you want a mirror of your 'master' drive, you might be able to configure this on your motherboard through your BIOS, but I think the two drives have to be of equal capacity. If you just want to backup some important data and don't mind reinstalling your OS (I presume Slackware) in case of hardware failure, you can use a rsync script in cron (that's the way I do it). What do you have on your master drive? Only one partition? Or is it a dual- or multi-boot setup? You can go low-level with dd from Linux as well to backup the MBR etc. Tell us some more and we'll try to guide you! |
You can use tar.
http://linux.cudeso.be/linuxdoc/backuprestore.php |
I use rsync for backup, why because it is simple :)
rsync can backup a directory to another in same machine or in a remote machine etc.. simple to set up a crontab like: Code:
30 20 * * * rsync -a /home/me /mnt/hd/backup > /dev/null 2>&1 and not whole directory, just new or recent modified files (the first time, it will back up the whole directory) easy :) |
Having a slave drive in the same computer is not essentially a backup plan. Probably what you actually could do in this type of scenario is to setup RAID1, mirror the drives. In case one fails, you're data is still intact until you replace the bad drive, then sync them back up, waiting for the next failure if it ever occurs.
|
Quote:
But what if our house burns down? We still loose everything. Backing up to a second drive is better than not backing up at all. Some *really* important files you can save on some shared drive on the internet or send to your own google-mail address. I also have like 10GB of pictures from my digital camera on my computer. I rsync all (of course, only the new ones go) to my wife's desktop. But I also burn a DVD once in a while and store it at another address. Because if my house burns down, a plane crashed in my street, etc., I might loose all furniture, but at least I'll have all those pictures to restore in a new system (after finding a new house, that is...) |
Quote:
A Backup Strategy |
Quote:
Now backups are different. Sure you can store data on a separate machine or other media for a just in case. That's still backing up your data to have in another location. Storing offsite in case your house burns down, etc cause you kept all your eggs in one location is called disaster recovery. It's the worst case scenario. But yeah, in this case, if I were the user, I'd just implement RAID1 to mirror the drives, then also have a backup plan as well if they really want to ensure data integrity and it's safe. I have all my precious photos, videos of kids stored on a backup server at home. Which keeps a copy on an external drive on the same backup server. Then I have that replicated on two remote servers, one at my mothers which is a 2 hour drive and another on a friends server in California I have access to, a good 1,500 miles away. I also started archiving this data to an archival grade DVD(s) and store those in a fire proof safe. I think I'm covered for disaster recovery. What can I say, I've been a backup administrator for over 6 years now at all my employers since becoming an System Administrator. ;) |
Quote:
We have redundancy for about everything, off-site backups, contingency systems, disaster recovery plans, a complete backup site in another state, etc. Our professional job makes us a bit paranoia in out private life! :D But I always ask the same question: how far do you want to go to guarantee continuity? It all comes at a cost, so sometimes - when on a lower budget - you have to accept a not-ideal solution. As for a private person: a simple RAID setup or even local rsync between two drives is better than nothing. And a hard drive costs almost nothing nowadays, so everybody can have some kind of backup solution at home. |
rsync with fat32 partition.
Quote:
Code:
rsync -a /home/me/Packages/ /home/me/backup/ > /dev/null 2>&1 But, if I try to backup to a fat32 partition (as user): Code:
rsync -a /home/me/Packages/ /media/winfat32/BackupSlackware/ > /dev/null 2>&1 If I do the same as root, things work ok. Everything is copied. Should I always be root to backup to a fat32 partition? or Should I modify something in fstab to be able to backup -rsync- as user? fat32 partition is (at least, I guess so :-) shared completely rwx permissions. Fstab looks like: Code:
I will appreciate your help! Thank you! Glore2002.- |
I don't know, never tried to do a rsync to a fat32 partition.
A quick google search led me to this link: http://lists.debian.org/debian-user/.../msg00955.html With the important part: Quote:
[edit] And maybe one more relevant link: http://ubuntuforums.org/showthread.php?t=451684 Good Hunting! |
shortname=mixed
How should I add that parameter in /etc/fstab? For what I understand I have to make sure my fat32 partition will let any user read, write and execute any file.
Code:
/dev/sda5 /media/winfat32 vfat auto,users,rw,umask=000 0 0 Glore2002.- |
When rsync fails to do what you want, it probably (99% probability) printing problems to stderr/terminal.
Try running rsync manually, from terminal and without "> /dev/null 2>&1" part. See what it doesn't like. |
Output from rsync.
Thanks ErV for adding your reply!
When executing rsync in terminal (as my user) I get the following error message. I will only post a couple of lines since all messages are the same. Only thing that changes is the folder rsync is trying to backup. $ rsync -a /home/me/Packages/ /media/winfat32/BackupSlackware/ Code:
rsync: failed to set times on "/media/winfat32/BackupSlackware/.": Operation not permitted (1) Thank you, Glore2002.- |
Quote:
This is also the error I'm always getting when I try to copy something to ntfs(3g) partitions. The best thing you can do is to use native *nix filesystem for backups (jfs, xfs, reiserfs, ext2, ext3), because you also probably use large drive (larger than 8GB) and fat32 wastes a lot of space on the drive. If it's not possible, you might try following: 1) Check rsync docs, maybe there is a switch that either makes rsync avoid this operation or ignore errors (there might be problems, because rsync probably relies on last access date information). 2) Check "man mount". There might be options for vfat that allows this operation. 3) As the last resort you can create large file on fat32 system, make filesystem within it, mount it as loop device and use it as backup. Example how you can do it (creates 100mb file with ext3 filesystem, then mounts it to /mnt/tmp2. should be run as root) : Code:
dd if=/dev/zero of=1.bin bs=1M count=100 Later you can mount this file with filesystem using fstab, as normal partition. Just make sure vfat partition (with file) will be mounted first. |
All times are GMT -5. The time now is 02:56 AM. |