[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Live Fille System Backup

I just realized that busy files are pretty much impossible to deal with no matter what.  If DB is in the middle of the transaction, then a "snapshot" based backup will work (we simply loose that transaction data as it is equivalent to crash).  Other busy files might be corrupted if those files don't use transaction model. 

I am not convinced that rsync can handle all device type files, all types of links and other attributes I don't even know about.  I am not convinced that anyone actually restored file system using rsync.  Does it really work?

I personally use rsync to synchronize data for application deployment and it works great.  But I usually have no special files to worry about.

On Fri, May 5, 2017 at 1:35 PM, Sergei G <sergeig.public@gmail.com> wrote:
it would be naive at best to think that busy files can be handled at application level.   No, rsync cannot handle the problem of entire file system dump.  Neither it is safe to handle all special file cases.  I am thinking about sparse files (if Linux has those).

On Thu, May 4, 2017 at 11:52 PM, Dejan Jocic <jodejka@gmail.com> wrote:
On 04-05-17, Sergei G wrote:
> That's good to know.
> Thank you
> On 5/4/17 6:46 PM, Anders Andersson wrote:
> > On Fri, May 5, 2017 at 1:17 AM, Sergei G <sergeig.public@gmail.com> wrote:
> > > I would like a backup tool that does not bring a million dependencies with
> > > MBs of files.  Something that works on server without X Windows and can send
> > > backup to an externally attached USB drive.  Nothing fancy.   No network
> > > infrastructure.  Incremental backups would be greatly appreciated.  Ability
> > > to pipe to a compression program is a plus, just like I did with dump.
> > > [...]
> > > Any advice would be greatly appreciated.
> > You won't like my solution, and it doesn't work with your current
> > setup because it requires a specific file system: btrfs[1]. I'm
> > posting it here for two reasons:
> >   1) You might consider using btrfs on new installs
> >   2) Someone else may search and find the thread
> >
> > After switching to btrfs I can now take instant snapshots of selected
> > filesystems, transfer these to remote servers for backup, and most
> > important: btrfs can track the *exact difference* between two
> > snapshots taken over time, and only transfer the changes. All of this
> > is very quick, because the filesystem already knows exactly what
> > changed: Permission bits, file sizes, deleted files, changed data,
> > whatever, all is already kept in a log. It also means that nothing
> > will be missed, for example ACL bits etc.
> >
> > The delta is just a simple stream of data that can be compressed if
> > necessary. Typically it is transmitted to a backup server where it is
> > "replayed" so that you have a full clone of the original system.[2]
> >
> > In debian I use the little tool, btrbk[3], to automate all of this.
> > You can simply do it manually if you want.
> >
> > [1] https://btrfs.wiki.kernel.org/index.php/Main_Page
> > [2] https://btrfs.wiki.kernel.org/index.php/Incremental_Backup
> > [3] https://github.com/digint/btrbk
> >

Perhaps rsync can do the job for you?

Reply to: