LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-28-2008, 11:14 AM   #1
feve£
LQ Newbie
 
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
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
 
Old 08-28-2008, 12:05 PM   #2
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 91
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!
 
Old 08-28-2008, 12:24 PM   #3
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
You can use tar.
http://linux.cudeso.be/linuxdoc/backuprestore.php
 
Old 08-28-2008, 12:39 PM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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
Every day at 20:30 the directory /home/me is backed up in /mnt/hd/backup
and not whole directory, just new or recent modified files (the first time, it will back up the whole directory)
easy

Last edited by keefaz; 08-28-2008 at 12:40 PM.
 
Old 08-28-2008, 12:41 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 08-28-2008, 12:59 PM   #6
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 91
Quote:
Originally Posted by trickykid View Post
Having a slave drive in the same computer is not essentially a backup plan.
Exactly. But how far do you want to go? I backup my data to my wife's computer and vice versa.
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...)
 
Old 08-28-2008, 01:25 PM   #7
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
I have a slave drive installed and would like to use it as a replacement in case the master fails.
Setting up RAID with an additional internal drive makes sense. However, I developed a personal backup strategy that uses both a second internal drive as well as an external drive. I use rsnapshot. You can read the details here:

A Backup Strategy
 
Old 08-28-2008, 01:26 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by niels.horn View Post
Exactly. But how far do you want to go? I backup my data to my wife's computer and vice versa.
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.
Exactly. That's why I mentioned or suggested using RAID. If they want backups just in case of a drive failure, that is the exact reasoning RAID exists.

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.
 
Old 08-28-2008, 05:31 PM   #9
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 91
Quote:
Originally Posted by trickykid View Post
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.
I know exectly what you mean... I work as an Operations Manager taking care os several Data Centers, with hundreds of computers.
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!

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.
 
Old 08-30-2008, 01:29 PM   #10
glore2002
Member
 
Registered: Mar 2007
Location: Buenos Aires, Argentina.
Distribution: Lubuntu 17.10 x64
Posts: 510

Rep: Reputation: 33
rsync with fat32 partition.

Quote:
Originally Posted by keefaz View Post
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
Every day at 20:30 the directory /home/me is backed up in /mnt/hd/backup
and not whole directory, just new or recent modified files (the first time, it will back up the whole directory)
easy
If I execute the following command as user:
Code:
rsync -a /home/me/Packages/ /home/me/backup/ > /dev/null 2>&1
It works perfectly well (I like this way of creating a backup)

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
Files are not copied but all empty subdirectories are created.

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:
/dev/sda5        /media/winfat32  vfat        auto,users,rw,umask=000 0 0

I will appreciate your help!
Thank you!

Glore2002.-
 
Old 08-30-2008, 02:59 PM   #11
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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:
Originally Posted by Andy Rowan
Another lesson is that the FAT32 partition should be mounted with the "shortname=mixed" option. If not, the rsync gets messed up. The default option is "lower," which means that files and directories with short names will have their names forced to lower case. But then rsync will think they're different from the ones it sees in the source that are upper case, and it will send the upper case ones again, and then delete the lower case ones. But since it's really the same files, the end result is it transfers a bunch of data and then deletes it all! Not good.
I don't know if it is relevant, but a quick test with a temp directory with only one file in it (and no subdirs) would reveal the messed filenames issue, try rsync it to /media/winfat32, test with different directory and file names, lower case, upper case, etc..
[edit]
And maybe one more relevant link:
http://ubuntuforums.org/showthread.php?t=451684
Good Hunting!

Last edited by keefaz; 08-30-2008 at 03:09 PM.
 
Old 08-30-2008, 03:50 PM   #12
glore2002
Member
 
Registered: Mar 2007
Location: Buenos Aires, Argentina.
Distribution: Lubuntu 17.10 x64
Posts: 510

Rep: Reputation: 33
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
Thanks,
Glore2002.-
 
Old 08-30-2008, 03:55 PM   #13
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
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.
 
Old 08-30-2008, 04:07 PM   #14
glore2002
Member
 
Registered: Mar 2007
Location: Buenos Aires, Argentina.
Distribution: Lubuntu 17.10 x64
Posts: 510

Rep: Reputation: 33
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)
rsync: failed to set times on "/media/winfat32/BackupSlackware/AMVConverter": Operation not permitted (1)
rsync: failed to set times on "/media/winfat32/BackupSlackware/ANTIVIRUS": Operation not permitted (1)

Thank you,
Glore2002.-

Last edited by glore2002; 08-30-2008 at 04:09 PM.
 
Old 08-30-2008, 05:16 PM   #15
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by glore2002 View Post
$ rsync -a /home/me/Packages/ /media/winfat32/BackupSlackware/

Code:
rsync: failed to set times on "/media/winfat32/BackupSlackware/.": Operation not permitted (1)
rsync: failed to set times on "/media/winfat32/BackupSlackware/AMVConverter": Operation not permitted (1)
rsync: failed to set times on "/media/winfat32/BackupSlackware/ANTIVIRUS": Operation not permitted (1)
Looks like it can't set file last access/modification date, because this operation either isn't supported on fat32 or isn't enabled in fstab somehow.

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
mkfs.ext3 1.bin
mount 1.bin /mnt/tmp2 -o loop -t ext3
You won't be able to access contents of filesystem within this file from within windows without using some kind of special utilities (I don't know what windows software can be used for this).
Later you can mount this file with filesystem using fstab, as normal partition. Just make sure vfat partition (with file) will be mounted first.

Last edited by ErV; 08-30-2008 at 05:18 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Tutorial: Point-and-Click Linux LVM Filesystem Workstation Backup, Part 2 LXer Syndicated Linux News 0 05-31-2007 04:01 PM
LXer: Tutorial: Point-and-Click Linux LVM Filesystem Workstation Backup, Part 1 LXer Syndicated Linux News 0 05-24-2007 10:47 PM
tutorial about slackware mobi Linux - Networking 1 12-03-2006 12:33 PM
My german Slackware Tutorial Lispy Slackware 4 09-15-2004 07:51 AM
tutorial - modules - slackware 9.1 xviddivxoggmp3 Slackware 3 02-24-2004 07:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration