On Thu, Jan 6, 2011 at 2:13 PM, Freddie Cash <[email protected]> wrote:
> On Thu, Jan 6, 2011 at 12:07 PM, C Anthony Risinger <[email protected]> wrote:
>> On Thu, Jan 6, 2011 at 1:47 PM, Freddie Cash <[email protected]> wrote:
>>> On Thu, Jan 6, 2011 at 11:33 AM, Marcin Kuk <[email protected]> wrote:
>>>> Rsync is good, but not for all cases. Be aware of databases files -
>>>> you should do snapshot filesystem before rsyncing.
>>>
>>> We script a dump of all databases before the rsync runs, so we get
>>> both text and binary backups.  If restoring the binary files doesn't
>>> work, then we just suck in the text dumps.
>>>
>>> If the remote system supports snapshots, doing a snapshot before the
>>> rsync runs is a good idea, though.  It'll be nice when more
>>> filesystems support in-line snapshots.  The LVM method is pure crap.
>>
>> do you also use the --in-place option for rsync?  i would think this
>> is critical to getting the most out of "btrfs folding backups", ie.
>> the most reuse between snapshots?  im able to set this exact method up
>> for my home network, thats why i ask... i have a central server that
>> runs everything, and i want to sync a couple laptops and netbooks
>> nightly, and a few specific directories whenever they change.  btrfs
>> on both ends.
>
> Yes, we do use --inplace, forgot about that one.
>
> Full rsync command used:
> ${rsync} ${rsync_options} \
>    --exclude-from="${defaultsdir}/${rsync_exclude}" ${rsync_exclude_server} \
>    --rsync-path="${rsync_path}" --rsh="${ssh} -p ${rsync_port} -i
> ${defaultsdir}/${rsync_key}" \
>    --log-file="${logdir}/${rsync_server}.log" \
>    ${rsync_us...@${rsync_server}:${basedir}/
> ${backupdir}/${sitedir}/${serverdir}/${basedir}/
>
> Where rsync_options is:
> --archive --delete-during --delete-excluded --hard-links --inplace
> --numeric-ids --stats
>
>> better yet, any chance you'd share some scripts? :-)
>
> A description of what we use, including all scripts, is here:
> http://forums.freebsd.org/showthread.php?t=11971

ah nice, i was hoping i didn't have to write it all myself; thanks!

>> as for the DB stuff, you definitely need to snapshot _before_ rsync.  
>> roughly:
>>
>> ) read lock and flush tables
>> ) snapshot
>> ) unlock tables
>> ) mount snapshot
>> ) rsync from snapshot
>
> Unfortunately, we don't use btrfs or LVM on remote servers, so there's
> no snapshotting available during the backup run.  In a perfect world,
> btrfs would be production-ready, ZFS would be available on Linux, and
> we'd no longer need the abomination called LVM.  :)

heh, ain't 'dat the truth.

> Until then, DB text dumps are our fall-back.  :)

always good to have that contingency plan :-)

thanks again,

C Anthony
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to