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 09-24-2010, 08:02 AM   #1
njb
Member
 
Registered: Apr 2010
Location: Behind the Gateway
Distribution: Slackware 13.1
Posts: 167
Blog Entries: 4

Rep: Reputation: 16
Red face Wich backup program for a slacker


I recently found in my prospects sbackup from sourceforge to simply backup the system under Linux.
But I also noticed it is a gnome oriented program under python.

I was wondering if it's a good backup solution for Slackware as I am running current.
Or may be there is just a command line to do it manually.
Or is there any other suggestions ??

NjB
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-24-2010, 08:48 AM   #2
brixtoncalling
Member
 
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403

Rep: Reputation: 67
The answer will be rsync.
 
Old 09-24-2010, 08:55 AM   #3
AlvaroG
Member
 
Registered: Jul 2009
Location: Canelones, Uruguay
Distribution: Slackware
Posts: 147

Rep: Reputation: 43
give rsnapshot a try :-) very good and easy to setup & use.

Last edited by AlvaroG; 09-24-2010 at 08:56 AM.
 
Old 09-24-2010, 08:57 AM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,357

Rep: Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739
Choosing a backup solution requires defining your needs.

I will assume that you are looking to do backup of a home system.
For my home PC, which has multiple partitions with NTFS partitions for Windows as well as Slackware32 and Slackware64 partitions, I backup to an external USB hard drive.

To backup the Slackware partitions I use 'rsync -av /path/to/Slack/ /path/to/USB/drive/' in a Slackware install apart from that which I want to backup. This means that I do not have to worry about problems that arise from trying to backup a live system. ( I have also used SystemRescue CD to do this).
To backup the NTFS partitions I use 'ntfsclone --output /path/to/USB/drive/imagefile /dev/WindowsPartition'. I sometimes add the '--save-image' option to ntfsclone to reduce the space required for the backup file, but I try to avoid this as it can be useful to be able to do a loop mount of the image.
 
2 members found this post helpful.
Old 09-24-2010, 09:09 AM   #5
njb
Member
 
Registered: Apr 2010
Location: Behind the Gateway
Distribution: Slackware 13.1
Posts: 167

Original Poster
Blog Entries: 4

Rep: Reputation: 16
Wink

Quote:
'rsync -av /path/to/Slack/ /path/to/USB/drive/' in a Slackware install apart from that which I want to backup. This means that I do not have to worry about problems that arise from trying to backup a live system.
Do you mean I do it from another PC in my home local network.
Or I simply logout from my cession.

Or am I obliged to boot the PC from a system usbkey or live CD to avoid backing up a live system ?

NjB
 
Old 09-24-2010, 09:19 AM   #6
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,357

Rep: Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739
No, you do not NEED to boot from to another system, but it does make life easy to do so. That way you do not have to worry about excluding directories (eg /sys /proc that are only populated when the system is live) or directories where files can change (eg /var/log).

This is the point of my first sentence. You need to define your needs. Are you happy to boot to another system to avoid complexity and take the associated downtime and inconvenience penalty? If not, then the backup procedure becomes more complex.

Last edited by allend; 09-24-2010 at 09:22 AM.
 
Old 09-24-2010, 09:24 AM   #7
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
There are very good arguments for not backing up a live running system (yes, do the backup from another OS). There is the possibility that something freshly written to the running disk (or not yet written by some application), can be missed at the last second in the backup. However that said, I've been doing live backups of my desktop machine using `rsync` for several years now, and have never had a problem doing it or restoring from a backup.
I wrote a little backup script that gets run by cron every morning. For various reasons, my script ignores /sys, /proc, /tmp, any Trash directories, and any mounted external media.

In short: I vote for rsync, regardless if you do it live or not. rsync is efficient and the command line syntax is not complicated.

Last edited by GrapefruiTgirl; 09-24-2010 at 09:27 AM. Reason: removed /dev as I do not exclude that - I just checked.
 
Old 09-24-2010, 09:39 AM   #8
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Rep: Reputation: 142Reputation: 142
Here is the command I use to backup:
Code:
# rsync -avHx --delete / /mnt/backup/root/
Repeat for all filesystems. e.g.
Code:
# rsync -avHx --delete /home/ /mnt/backup/home/
Then to restore I:
-Boot from a live cd
-Mount my Slackware and backup partitions
-And run something like:
Code:
# rsync -avHx --delete /mnt/backup/root/ /mnt/slack/
# rsync -avHx --delete /mnt/backup/home/ /mnt/slack/home/
Short explanation of the rsync options:
-a = archive mode (preserves permissions and stuff)
-v = verbose
-H = preserve hard links
-x = one filesystem (don't copy files from other filesystems e.g /proc, /sys, /home, /boot, etc)
--delete = delete extra files from destination directories
 
2 members found this post helpful.
Old 10-02-2010, 08:03 PM   #9
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
@piratesmack:
Thanks for the above post. For some reason I had never found the -x option for rsync. I had a backup script that ran as a cron to backup all of the partitions except "/", then I would occasionally boot from another partition & backup "/". I've been (carefully) testing this code since I read it & today added it to the script. It is nice to know that I don't have to remember to backup my root partition.
@njb: As noted above this solution works well for me, but YMMV. You should try it.
Regards,
Bill
 
Old 10-03-2010, 12:03 AM   #10
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
If you are using lvm, you can use the snapshot mechanism to ensure a consistent view of the logical volume that you are backing up. See http://www.howtoforge.com/linux_lvm_snapshots (which gives Debian-specific information on how to restore a root partion). The LVM-HOWTO also talks about lvm snapshots: http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html

http://serverfault.com/questions/239...ackup-strategy has some pointers too.
 
2 members found this post helpful.
Old 10-03-2010, 01:04 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by allend View Post
Choosing a backup solution requires defining your needs.
+5 to that. How fast do you need to get the system back after a failure? For most home users an adequate disaster recovery plan is to buy a new computer (or fix, as required), re-install OS and apps, restore user data. A utility company's billing server needs to be back online a bit faster than that!

How much work and cash are you prepared to put into it? How much expertise do you have?

Do you want a graphical restore facility? Including being able to restore old versions of files?

Are you planning on off-site backup media?

One backup solution that wasn't mentioned was hubackup (Home User Backup) which looked promising a few years ago -- but people had difficulty restoring from it (which defeated the object!).

LVM snapshots are important if you have apps that spread coordinated data across several files such as a database that has separate files for data and indexes -- or you can stop those apps while the backup is running or use their built-in backup tools.
 
Old 10-03-2010, 11:35 AM   #12
qweasd
Member
 
Registered: May 2010
Posts: 621

Rep: Reputation: Disabled
Personally, I use rsync + ssh to backup my data daily from multiple computers to multiple targets, both local and remote. It is a one-page script, it leaves complete logs, and in the last 6 months or so I never was unsafe for more than a couple of days. My backup is very simple, though, since I only save the data (think /home/qweasd) and a few system configuration files which I'd like to have handy if my filesystem implodes. I do not backup entire volumes because reinstalling either Slackware or Ubuntu on my home computers only takes a few hours, and that is the route I am willing to take. Your situation, of course, may be very different.
 
Old 10-03-2010, 12:27 PM   #13
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 543

Rep: Reputation: 121Reputation: 121
rsync + Grsync for you.
 
Old 10-03-2010, 02:05 PM   #14
kingbeowulf
Senior Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,262
Blog Entries: 11

Rep: Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744
Grsync! Well heck, never knew that existed. I'll have to try it. I have a heck of a time remembering all the options...

As for backups, on my home system, I vote for rsync, a properly thought out partition strategy and a properly defined backup strategy. Do you
  1. want fast recovery from HD crash?
  2. want to save personal data?
With (1) you can just image the whole drive. You can save it to an bootable external USB drive to restore quickly. You can also loop mount to grab bits.
With (2), place /home on another partition, rsync it to another drive. For example, I have '/home', '/archive' and '/archive2'. All my important docs are on /archive (500 GB SATA), /home (90 GB partition on a 120GB PATA) gets copied to /archive, and /archive gets rsynced to /archive2 on an external USB drive (500 GB). That gives me 2 (3 for /home) copies of my files.

I also copy /etc in case I need those files. I don't bother with saving / as I have found it just as easy to do clean install and then 'upgradepkg --install-new' from /archive, etc. to restore the system.

If you want, you could also set up mirrored RAID. I ran a data acquisition server a while back set up with mirrored, hot-swappable SCSI-3 drives. The Oracle database was also dumped daily to a backup server that was a mirror of the first.

As its too late to make a long story short on this Sunday morning...the message here is: Just what is it that you want to back up?
 
1 members found this post helpful.
Old 10-03-2010, 04:03 PM   #15
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 543

Rep: Reputation: 121Reputation: 121
Quote:
Originally Posted by beowulf999 View Post
Grsync! Well heck, never knew that existed. I'll have to try it. I have a heck of a time remembering all the options...
The guy was nice enough to spit out the commands passed to rsync (ALT+R) ;]
Attached Thumbnails
Click image for larger version

Name:	Captura de tela - 03-10-2010 - 17:55:32.png
Views:	47
Size:	164.5 KB
ID:	4756  
 
  


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
Wich program can i use to control net speed on my server? beji Linux - Software 1 03-17-2006 03:51 AM
Wich interface is wich? xonner Linux - Hardware 3 03-16-2006 09:05 AM
wich dc program? blueprobe Linux - Newbie 2 02-26-2005 05:07 AM
Wich program can i use for debian to play movies? mpho Debian 8 12-22-2004 09:52 AM
Backup program? muah Linux - Software 2 08-28-2003 10:27 AM

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

All times are GMT -5. The time now is 05:59 AM.

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