FreeBSD Bugzilla – Attachment 10533 Details for
Bug 21093
New option for restore (patch)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 3.25 KB, created by
Stefan Moeding
on 2000-09-07 17:10:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Stefan Moeding
Created:
2000-09-07 17:10:00 UTC
Size:
3.25 KB
patch
obsolete
>diff -ruN restore/main.c /usr/src/sbin/restore/main.c >--- restore/main.c Wed Sep 6 21:58:51 2000 >+++ /usr/src/sbin/restore/main.c Thu Sep 7 17:41:01 2000 >@@ -52,6 +52,7 @@ > #include <protocols/dumprestore.h> > > #include <err.h> >+#include <errno.h> > #include <stdio.h> > #include <stdlib.h> > #include <unistd.h> >@@ -99,9 +100,9 @@ > inputdev = _PATH_DEFTAPE; > obsolete(&argc, &argv); > #ifdef KERBEROS >-#define optlist "b:cdf:hikmNRrs:tuvxy" >+#define optlist "b:cD:df:hikmNRrs:tuvxy" > #else >-#define optlist "b:cdf:himNRrs:tuvxy" >+#define optlist "b:cD:df:himNRrs:tuvxy" > #endif > while ((ch = getopt(argc, argv, optlist)) != -1) > switch(ch) { >@@ -117,6 +118,12 @@ > case 'c': > cvtflag = 1; > break; >+ case 'D': >+ if (chdir(optarg) < 0) >+ errx(1, >+ "error accessing file system %s; %s", >+ optarg, strerror(errno)); >+ break; > case 'd': > dflag = 1; > break; >@@ -293,11 +300,11 @@ > usage() > { > (void)fprintf(stderr, "usage:\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n", >- "restore -i [-chkmuvy] [-b blocksize] [-f file] [-s fileno]", >- "restore -r [-ckuvy] [-b blocksize] [-f file] [-s fileno]", >- "restore -R [-ckuvy] [-b blocksize] [-f file] [-s fileno]", >- "restore -x [-chkmuvy] [-b blocksize] [-f file] [-s fileno] [file ...]", >- "restore -t [-chkuvy] [-b blocksize] [-f file] [-s fileno] [file ...]"); >+ "restore -i [-chkmuvy] [-b blocksize] [-D path] [-f file] [-s fileno]", >+ "restore -r [-ckuvy] [-b blocksize] [-D path] [-f file] [-s fileno]", >+ "restore -R [-ckuvy] [-b blocksize] [-D path] [-f file] [-s fileno]", >+ "restore -x [-chkmuvy] [-b blocksize] [-D path] [-f file] [-s fileno] [file ...]", >+ "restore -t [-chkuvy] [-b blocksize] [-D path] [-f file] [-s fileno] [file ...]"); > done(1); > } > >diff -ruN restore/restore.8 /usr/src/sbin/restore/restore.8 >--- restore/restore.8 Wed Sep 6 21:58:51 2000 >+++ /usr/src/sbin/restore/restore.8 Thu Sep 7 17:31:00 2000 >@@ -44,24 +44,28 @@ > .Fl i > .Op Fl chkmNuvy > .Op Fl b Ar blocksize >+.Op Fl D Ar path > .Op Fl f Ar file > .Op Fl s Ar fileno > .Nm restore > .Fl R > .Op Fl ckNuvy > .Op Fl b Ar blocksize >+.Op Fl D Ar path > .Op Fl f Ar file > .Op Fl s Ar fileno > .Nm restore > .Fl r > .Op Fl ckNuvy > .Op Fl b Ar blocksize >+.Op Fl D Ar path > .Op Fl f Ar file > .Op Fl s Ar fileno > .Nm restore > .Fl t > .Op Fl chkNuvy > .Op Fl b Ar blocksize >+.Op Fl D Ar path > .Op Fl f Ar file > .Op Fl s Ar fileno > .Op file ... >@@ -69,6 +73,7 @@ > .Fl x > .Op Fl chkmNuvy > .Op Fl b Ar blocksize >+.Op Fl D Ar path > .Op Fl f Ar file > .Op Fl s Ar fileno > .Op file ... >@@ -275,6 +280,11 @@ > .Fl c > flag disables this check, and only allows reading a dump in the old > format. >+.It Fl D Ar path >+Specifies the destination path of where to restore the files. >+Without the >+.Fl D >+flag, the files are restored to the current directory. > .It Fl f Ar file > Read the backup from > .Ar file ; >@@ -422,6 +432,17 @@ > owner, mode, and time stamps for directories. > .It Pa \&./restoresymtable > information passed between incremental restores. >+.El >+.Sh EXAMPLES >+The dump and >+.Nm restore >+commands may be used in a pipeline expression to copy file systems. >+The following are typical commands, both equivalent: >+.Bd -literal -offset indent >+dump -0 -a -f - /usr | (cd /mnt; restore -r -f -) >+dump -0af - /usr | restore -rf - -D /mnt >+.Ed >+.Pp > .El > .Sh SEE ALSO > .Xr dump 8 ,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 21093
: 10533