انجمن‌های فارسی اوبونتو

لطفاً به انجمن‌ها وارد شده و یا جهت ورود ثبت‌نام نمائید

لطفاً جهت ورود نام کاربری و رمز عبورتان را وارد نمائید




نویسنده موضوع: اپشنهای rsync  (دفعات بازدید: 624 بار)

0 کاربر و 2 مهمان درحال مشاهده موضوع.

آفلاین md2014

  • High Sr. Member
  • *
  • ارسال: 666
  • جنسیت : پسر
اپشنهای rsync
« : 15 دی 1395، 09:58 ق‌ظ »
سلام.
این دستور برای ایجاد یک نسخه پشتیبان از وضعیت سیستم فعلیه.میخوام بدونم ایا این دستور درسته طبق گفته؟
سوال بعدی هم اینه که خب برای ریستور کردن باید چه دستوری استفاده بشه؟
rsync --backup --one-file-system --delete --backup-dir=/backvol/myname/archives/2016-12-12 --stats --archive --ignore-errors / /backvol/myname/current

آفلاین بابک طور

  • Hero Member
  • *
  • ارسال: 800
  • جنسیت : پسر
پاسخ : اپشنهای rsync
« پاسخ #1 : 15 دی 1395، 11:23 ق‌ظ »
سلام.
این دستور برای ایجاد یک نسخه پشتیبان از وضعیت سیستم فعلیه.میخوام بدونم ایا این دستور درسته طبق گفته؟
سوال بعدی هم اینه که خب برای ریستور کردن باید چه دستوری استفاده بشه؟
rsync --backup --one-file-system --delete --backup-dir=/backvol/myname/archives/2016-12-12 --stats --archive --ignore-errors / /backvol/myname/current

این manpage دستور rsync هست. شما با زدن دستور:
man rsync
هم به همین فایل دسترسی داری.
کافیه چیزایی که نوشتی رو دونه دونه توش پیدا کنی و ببینی که چیکار می‌کنن. مثلاً:
-b, --backup
              With  this  option, preexisting destination files are renamed as
              each file is transferred or deleted.  You can control where  the
              backup  file  goes  and what (if any) suffix gets appended using
              the --backup-dir and --suffix options.

              Note  that  if  you  don’t   specify   --backup-dir,   (1)   the
              --omit-dir-times  option will be implied, and (2) if --delete is
              also in effect (without --delete-excluded),  rsync  will  add  a
              "protect"  filter-rule  for  the backup suffix to the end of all
              your existing excludes (e.g. -f  "P  *~").   This  will  prevent
              previously backed-up files from being deleted.  Note that if you
              are supplying your own filter rules, you may  need  to  manually
              insert  your own exclude/protect rule somewhere higher up in the
              list so that it has a  high  enough  priority  to  be  effective
              (e.g.,  if  your rules specify a trailing inclusion/exclusion of
              ’*’, the auto-added rule would never be reached).

       --backup-dir=DIR
              In combination with the --backup option,  this  tells  rsync  to
              store  all  backups  in the specified directory on the receiving
              side.  This can  be  used  for  incremental  backups.   You  can
              additionally  specify  a backup suffix using the --suffix option
              (otherwise the files backed up in the specified  directory  will
              keep their original filenames).

              Note  that  if you specify a relative path, the backup directory
              will be relative to the destination directory, so  you  probably
              want  to  specify  either an absolute path or a path that starts
              with "../".  If an rsync daemon is the receiver, the backup  dir
              cannot  go  outside  the  module’s path hierarchy, so take extra
              care not to delete it or copy into it.