VectorLinux
July 30, 2014, 12:42:49 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Gsrync backup to External hard drive question  (Read 1704 times)
sledgehammer
Vectorian
****
Posts: 1419



« on: February 25, 2010, 12:20:16 am »

I have a seagate external hard drive, usb.  When I insert it, thunar opens but does not allow me to create a file or folder.  Apparently the file is read only. Grsync, of course, can't back up to a read only file.

I think I want to format the external hard drive to, say, to reiserfs. Comments?

If so, anyone know how to do it?

John
Logged

VL7.0 xfce4 Samsung RF511
Andy Price
Packager
Vectorite
****
Posts: 237


« Reply #1 on: February 25, 2010, 03:00:51 am »

Hi John. Here's how I do it. First make a note of device name - usb drives are usually /dev/sda1 on my VL6.0 Gold setup. Unmount the drive. Open a root terminal and type, for example, "mkfs.ext3 -L Backup /dev/sda1" to create an Ext3 file system and give the volume the label Backup. I have never used Reiserfs, but I imagine the command would be similar.
Andy
Logged
sledgehammer
Vectorian
****
Posts: 1419



« Reply #2 on: February 27, 2010, 09:49:57 am »

Thanks Andy

Your suggestion worked, and now I have a second usable external hard drive. Couple of notes:  I had no idea how to find where the eternal mounted.  When inserted, it opened thunar to media/disk-1.  Tried formatting there first and nothing.  So I just copied your mkfs line and that worked.  (It still boots up to media/disk-1 in thunar and I had to change owner of media/disk-1 from root to me before it would write). 

I have another external, a VERBATIM, which worked fine out of the box and which, until now at least, I was using as backup.  I have no clue why the seagate required formatting.
Logged

VL7.0 xfce4 Samsung RF511
toothandnail
Tester
Vectorian
****
Posts: 2527


« Reply #3 on: February 27, 2010, 12:45:23 pm »

You normally can't format a mounted drive.

Something I should have thought about. My Seagate FreeAgent Go has power saving built into the firmware, and it doesn't work with Linux. I had problems with the drive if it was left idle. If it went into power saving mode, it would never come back correctly, and would sometimes not unmount cleanly.

If your drive has the same problem, there is a way of fixing it, but I'm not sure whether it will work with the disk formatted to a Linux file system. What I had to do was install the Windows software (under Vista - yuck) and then run the utilities and disable power saving. Hasn't given me any problems since.

You may need to format it back to NTFS, though if you have access to a Windows box, I would try the utilities and see if they will run with the drive formatted to ext2/3

I've left my Seagate NTFS since I use it almost exclusively for media files, and its useful having it usable under Windows. I use an xfs formatted 80 GB for backups (a laptop drive left over from an upgrade put into a USB caddy).

Using HAL, you will find that a USB drive will mount under /media, using the partition label as a name (so my backup drive mounts as /media/DataTrans - which is what I labeled it when I partitioned and formatted it).

Paul.

Logged
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #4 on: February 27, 2010, 01:53:42 pm »

I have five external hard drives. Even if I want to share them with Windows, I always try to have a Linux-formatted partition on the drive. The part I'm sharing will be NTFS, but I need the Linux partition so I can do a straight copy from Linux to the Linux partition on the external drive and retain file ownership and permissions. This makes backing up pretty easy and I don't need a special backup program to copy to and from the external drive.
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
toothandnail
Tester
Vectorian
****
Posts: 2527


« Reply #5 on: February 28, 2010, 05:33:42 am »

I have five external hard drives. Even if I want to share them with Windows, I always try to have a Linux-formatted partition on the drive. The part I'm sharing will be NTFS, but I need the Linux partition so I can do a straight copy from Linux to the Linux partition on the external drive and retain file ownership and permissions. This makes backing up pretty easy and I don't need a special backup program to copy to and from the external drive.
--GrannyGeek

I think you miss the point of something like Grsync (or rsync, if you are prepared to use the command line). It is esentially a synchronisation (sp - sorrry, I'm stuck on a Windows system with IE 6! at the moment...) utility. It has a major advantage in terms of both time and effort, since it will only copy new or changed data. It is ideal when using a single generation backup routine.

As an example, one of the SME systems I maitain belongs to a small company producing prototype desgns for all sorts of things. I have their file server backing up to two different NAS units, in both cases using rsync. Before I started using the rsync option, it was taking 12 hours to do a complete backup (on a seven generation rotation). Using rsync (and effectively two generations, one on each NAS) it takes an average of around 30 minutes per night. While that is obviously extreme compared to the sort of backup any individual user is likely to need, it does indicate the sort of time differences between doing entire copies and doing a selective backup of changed data.

As to a backup utility, even though most of my needs could be met by simply copying (or archiving for storage on a non-linux file system), I still prefer to use a backup utility, since most if not all can be automated and set to run from a cron event. I long ago learned that manual copying will always fail to get done just before you need it most. Its all too easy to get busy at a critical time and not get round to doing a manual backup. Murphy says that immediately after that happens, you will suffer a hard drive failure, or a power spike will lead to massive data corruption.....

I've also found that not all USB drives work well with multiple partitions, so I tend to use single partitions, either NTFS or xfs, depending on what I need the drive for.

Paul.
Logged
sledgehammer
Vectorian
****
Posts: 1419



« Reply #6 on: February 28, 2010, 09:30:12 am »

Some confusion here, if such there be, is likely my fault.  I still don't have the courage to use Grsync properly (in the manner suggested by toothandnail).  I have several /home backups on my Verbatim hard drive.  In order to make room, I delete one of them every Sunday night, using mc as it is faster.  Then, before hitting the sack, I start grsync.  It is done by the time I get up next morning (if I get enough sleep).  It usually ends with "completed with errors" and if I have time I address that issue so that the next week's backup is without error.

There are some advantages to this, compared to using Grsync properly, as if errors have been made during the week, they are not perpetuated doing it my way. 

What I probably should do is a proper (overwrite) Grsync backup every night or so and a new grsync (clean) backup ever couple of weeks. Now that I have a second external drive, I might try that.

One of the great things about a grsync backup is that all the dates and stuff are not changed.  I had a disaster a couple of months back and had to use the grsync backup and it worked perfectly.

John
Logged

VL7.0 xfce4 Samsung RF511
toothandnail
Tester
Vectorian
****
Posts: 2527


« Reply #7 on: February 28, 2010, 10:08:40 am »

Smiley Grsync is perfect for that sort of use, though I would be concerned if it was completing with errors all the time. I can see a few (locked files, or copying to a non-native filesystem), but I would be worried if I was getting many others.

I use Grsync for backing up a couple of things which don't need regular backup. I have a large collection of built packages and their source (the stuff I've built for VL6.0 is now around 1.8 GB), and any time I complete a new build, I use Grsync to make sure the new data is saved to the backup (currently going to a small NAS unit which I wish I'd never bought - don't buy an Icy Box NAs whatever you do - Raidsonic are not real good at making them work well....). Grsync is prefect for this because it simply adds any new data, so the backup takes little or no time.

About the best backup utility I've encountered is DAR. It has very smart exclusions, so you can be very selective about what you do and don't backup. It is also smart enough to understand archives, so it will not attempt to compress already compressed files, which makes it nice and quick. Its one downfall is the most obtuse command line I've ever encountered. Any time I attempt to use it, I have to read the man page and then experiment before I can get it right.

There is now some support for DAR in Synbak, which is a very useful small command line backup utility. Takes a bit of setting up, but once its done, it can be left to get on with things on its own.

Something else that you can look at is Grsync's abilty to generate scripts. Once you have a backup routine that works for you using Grsync, you can get it to create a script, which can then be set up as a cron event - automated backup with help for setting up.

Paul.
Logged
Andy Price
Packager
Vectorite
****
Posts: 237


« Reply #8 on: February 28, 2010, 05:01:53 pm »

Hi John

There are several ways to find the USB drive. If you are using VL6 Gold like me then there should be a drive icon down on the bottom bar near the speaker icon and this shows all your drives and mount points when you click on it. If you don't have this icon in your version of VL then you can open a root terminal and type fdisk -l to see all the partitions, or typing mount will give this info too. You're looking for the device name, not the mount point, as you need to unmount to format it anyway.

If you can sort out those errors with grsync then I think that using it to actually synchronise files (as toothandnail suggests) is the way to go as it cuts down backup times enormously. I use it to synch my modest 70+ GB of files and it takes less than ten minutes every week.

Cheers
Andy

Logged
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #9 on: February 28, 2010, 05:34:05 pm »

I do understand the difference between simply copying files to another drive and using a backup program that can be set up to do what amounts to an incremental backup (just changed files) and can be preconfigured to back up certain files and directories. For what toothandnail describes, something like grsync is far preferable to just copying files.

However, for my purposes it's overkill. My primary backup method is redundancy. I have three computers with Linux and Windows partitions. *ALL* my data is on all three computers. I never turn off a computer unless whatever data I added or changed gets copied over my network to at least one of the other computers. If I don't have another computer turned on, I copy the changed data to a thumb drive and when I turn on another computer, the data gets moved to it from the thumb drive. From time to time I check to make sure all the data is on all the computers. Once in a while I burn data to DVDs that can be stored offsite as well as in the house.

I make image files of partitions where my Windows system files live. The data drives are simply copied. The image software (the version of Acronis True Image that comes with Seagate drives) can also make images of reiserfs and ext 2 and 3 Linux partitions. In case of a system meltdown, I can restore the latest image rather than having to start from scratch. When I replaced a 100-gig internal drive with a 1 terabyte drive a few months ago, I used the image file from the Seagate version of True Image, which worked exactly as expected and made the whole process easy (needless to say, I had multiple backups of those partitions created with various programs because it would have been a disaster if I hadn't been able to restore the whole drive exactly as it was, just bigger). A cyber friend gave me a tar line that will copy everything that should be copied from a Linux partition to an external drive and I use that from time to time to make Linux backups. To restore, I reformat the drive and use another tar variant to copy the files back to the original partition.

I am not good at remembering command syntax, but I can copy and make slight modifications if someone shows me what to do. I also do not create scripts. A lot of Linux backup options are too geeky for me. I once looked at a GUI Linux backup program but I couldn't fathom it. I don't have the cron daemon running because I can't comprehend it, either, and I'm not fond of things running behind my back, so to speak. I usually turn my computer(s) off when I'm finished with them.

Getting both Windows and Linux partitions on an external drive can be a bit tricky, but I've managed to do it three or four times. I don't remember the steps I took.
--GrannyGeek
« Last Edit: February 28, 2010, 05:39:20 pm by GrannyGeek » Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
Andy Price
Packager
Vectorite
****
Posts: 237


« Reply #10 on: February 28, 2010, 06:27:39 pm »

Quote
Getting both Windows and Linux partitions on an external drive can be a bit tricky, but I've managed to do it three or four times. I don't remember the steps I took.

I think I would fall back on a nice GUI tool such as GParted rather than risk Armageddon at the command line Smiley
Logged
sledgehammer
Vectorian
****
Posts: 1419



« Reply #11 on: February 28, 2010, 08:38:31 pm »

Andy, thanks for the suggestion re finding the external drive mount point. It worked. I am going to try my "new" external hard drive on tonight's backup.

GrannyGeek, thanks for the image suggestion.  I will use that if I ever update my T42.  The main reason I don't update, other than cost, is that I am waiting for a computer with a screen I can read in broad daylight.  I like to work outside, and everyone who knows me likes me to work outside (I smoke cigars).  But another reason for not updating is the massive amount of time it takes to get things set up on a new computer. Your image suggestion probably takes most of that reason off the table.

BTW, Gsrync root backup (on my Vector System menu) is easy to use.  Very.  I figured it out by myself, though I may have asked a question or two of the forum. I don't recall. I agree that scripts are problematical, mainly because they require maintenance every few months or so and I forget to maintain.  I did once have grsync set up on a script, but let it go when I checked once and it had not been working for a while.  I can remember to backup once a week, and do.
Logged

VL7.0 xfce4 Samsung RF511
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!