Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a file server running on Ubuntu 8.04. I have a separate volume in LVM that I have mounted and shared via samba. I currently take a snapshot of the volume every 15 minutes, do a backup using rdiff-backup to another hard disk, then I release the snapshot. The largest file on the share is a single Microsoft Access file that a few people connect to. Are there easier ways of performing the backups? Does it really matter?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

In general, snapshots are a very good way to do backups. However, they don't solve every problem.

I'm not familiar with Access specifically, but are you sure that the database file is in a consistent state when you take the snapshot?

If this was a MySQL database, you would connect and run FLUSH TABLES WITH READ LOCK; to ensure that any writes were flushed, and all the tables were locked-- ie the datafiles would be in a consistent state-- before taking the snapshot. (subsequently you'd run UNLOCK TABLES; to return things to normal.)

Similar caveats may apply to other files on the share. Depending on what Access actually does, and without knowing what the other files and programs in question are, the safest thing might be to perform backups during a scheduled window during which no clients are connected, or at least no files are open and writable.

Samba presents additional problems in the form of client and server side caching. Oplocks for instance: http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html Also check out the strict sync, and sync always options.

share|improve this answer
    
That was is one of my fears actually. Obviously samba is doing the file locking, so I assume it would have to quiesce in samba. I need to research this more and/or wait for someone who is familiar. All other shared files should just be word/excel docs and pictures. –  senorsmile Dec 10 '10 at 0:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.