rsync --backup --one-file-system --delete --backup-dir=/backvol/myname/archives/2016-12-12 --stats --archive --ignore-errors / /backvol/myname/current
سلام.
این دستور برای ایجاد یک نسخه پشتیبان از وضعیت سیستم فعلیه.میخوام بدونم ایا این دستور درسته طبق گفته؟
سوال بعدی هم اینه که خب برای ریستور کردن باید چه دستوری استفاده بشه؟کد: [انتخاب]rsync --backup --one-file-system --delete --backup-dir=/backvol/myname/archives/2016-12-12 --stats --archive --ignore-errors / /backvol/myname/current
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.