LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to backup files? (https://www.linuxquestions.org/questions/linux-general-1/how-to-backup-files-788522/)

allend 02-15-2010 08:14 AM

Quote:

What exactly is the UUID?
http://en.wikipedia.org/wiki/Univers...que_Identifier
Quote:

That doesn't look like a udev rule. Is it an fstab entry?
Yes. As I stated in my post.
Quote:

Anyway, I don't want the drive to be mounted automatically at boot-up.
Hence the 'noauto' option.
Quote:

I could be plugging it in and out randomly.
And when you do plug the device, then it can be mounted with a consistent mount point, or from a script, which is what I do. This particular unit is normally plugged to a server for backups scheduled as a cron job. The backup script mounts the device, performs the backup and unmounts the device just prior to the script exiting.
Quote:

And why does it say "ntfs-3g"?
The device in this example is formatted with as NTFS.

MTK358 02-15-2010 08:35 AM

Quote:

Originally Posted by allend (Post 3864361)

I still don't really get it.

Quote:

Originally Posted by allend (Post 3864361)
Yes. As I stated in my post.

Quote:

Originally Posted by allend (Post 3864361)
Hence the 'noauto' option.

So how do I use it? Could you explain to me how that fstab line helps?

Why not make a udev rule that makes a symlink called "backup" for the first partition of a drive with the correct UUID?

Quote:

Originally Posted by allend (Post 3864361)
And when you do plug the device, then it can be mounted with a consistent mount point, or from a script, which is what I do. This particular unit is normally plugged to a server for backups scheduled as a cron job. The backup script mounts the device, performs the backup and unmounts the device just prior to the script exiting.

I want a script to automatically mount it, and then unmount it when the backup is done.

Quote:

Originally Posted by allend (Post 3864361)
The device in this example is formatted with as NTFS.

Why would you format your Linux flash drive with NTFS? Why not FAT, which has better Linux support and still works fine with Windows?

allend 02-15-2010 08:46 AM

The UUID is a unique identifier for your device.
The fstab line saves you from having to make a custom udev rule, but still allows you to have a consistent mount point.
The script you will have to write for yourself to suit your own circumstances. My script simply mounts the drive, runs a couple of rsync commands, then unmounts the drive. You can find it here. http://www.linuxquestions.org/questi...1/#post3810632
The device in my example is an external USB drive. It came formatted with NTFS and contained existing backups made using Windows tools prior to being put into service with this server.


All times are GMT -5. The time now is 11:10 PM.