1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307
|
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Backup Copy v2.0
Released November 16, 1998
Copyright (c) 1998 - Kevin Lindsay
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
TABLE OF CONTENTS
Introduction ................................................ I
Description ................................................. II
Whats New/Fixed ............................................. III
Using Backup Copy ........................................... IV
Acknowledgments ............................................. V
Contact Information ......................................... VI
Supported Systems ........................................... VII
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I. INTRODUCTION
------------
This is my first attempt at somewhat proper documentation for
Backup Copy. Hopefully this will provide an easy, quick guide to
using this program. If there is anything that you feel should be
changed, or if I should be knocked-up-side the head about, please
let me know. (c; Contact info is at the bottom of this file.
II. DESCRIPTION
-----------
Backup Copy is basically a smart copy program that allows a user
to copy mass files from one place to another. When coping over a
previous copy, the key features will allow coping only of new or
non existing files in the backup. This results in saving time and
less load on the drive. Built into the same feature of copying
new files only, is a file removal procedure. If a file is removed
from the source path, the same file will be removed when the next
backup is performed. This provides a backup that is exactly the same
as the source without filling up the drive. As an added option, all
files that will be overwritten or deleted when doing a copy over a
previous backup, have the opportunity to be stored in a trash bin.
You can leave this trash bin to grow and grow just in case you need a
backup of your backup. When you start running out of disk space you
will need to remove or clean up the trash bin.
III. WHATS NEW/FIXED
---------------
************
** v2.0 **
************
1.0 Fixed a long silly bug which caused cpbk to skip files begining with a
space.
2.0 Optimized a bit of code. It should be a little bit faster, but nothing
very noticible.
3.0 Added the -E option to prevent excluded directories from being deleted
from an incremental backup. If you use the -e option, any directories
excluded from the source will be deleted from the backup if they exist.
4.0 Added the -q option for Quiet mode. Suppressed all error messages.
5.0 Fixed a trashbin directory bug. It would not create a trashbin more
than 1 depth if it did not exist.
6.0 Ported to HPUX, AIX, DEC, IRIX, and SUNOS.
IV. USING BACKUP COPY
-----------------
There are many ways to use Backup Copy. I will first list all the
options and what they do, then I will provide examples of how to do
specific tasks.
Options
-------
-c <conf file> Specify a configuration file. See sub section
"Config File" below on how to use the configuration
file.
-e "<dir1,...>" Exclude specified directories from the copy. This
option is handy for excluding NFS mounts that
might result in multiple copies of the same
files. Also if you are backup a directory which
contains your destination directory for you
backup, excluding your destination directory
would be mandatory.
*Note* - If you are doing an incremental backup and you
exclude directories that exist in the backup, they will
be removed. Use the -E option below to to save those
directories.
-E "<dir1,...>" Exclude specified directories but do not remove them
from an incremental backup.
-f Find mode. This will just scan through all of
your files without copying them. When used with
the "-v" option, it will display all files in the
specified path.
-n Compare last modified time and copy New files
only as well as remove files and directories that
have been deleted from the source path.
-r Recursive mode. Copy files from <source> recursively
to directory <destination>.
-t <directory> Move all old and deleted files from the last backup
to the specified trashbin. -n flag is automatically
used when -t is specified.
-s <seconds> Maximum time in seconds that comparison on file
modification time can differ between source and
destination files.
-i Toggle inode information file comparison checking OFF.
-z Toggle file size comparison checking OFF.
-q Quite mode. Suppress all error messages.
-v Verbose mode. Display all files being copied.
-V Display Version.
Examples
-------
1.0 Copy one file from one place to another.
cpbk file1.txt file2.txt
2.0 Copy a directory and all of its contents to a specified
destination.
cpbk -r /dir1 /dir2
3.0 Copy only new files from directory to a previous backup,
and remove any files that have been deleted from the source
directory from the previous backup.
cpbk -rn /dir1 /dir2
4.0 Perform the same action as example 3.0, except copy all files
that are being overwritten or removed from the previous backup
to a trash bin.
cpbk -rn -t /trashbin /dir1 /dir2
5.0 Perform the exact same action as example 4.0 except exclude
two directories that are located in the source.
cpbk -rn -t /trashbin -e "/excludedir1/,/excludedir2/" /dir1 /dir2
Well, that pretty much concludes all the examples for the
most part. Of course many other variations are plausible.
Config File
-----------
If you so desire you may use a configuration file for all of
your options. The file "sample.config" should also have been
included with your copy of Backup Copy. Below I will list how to
to use each option for Backup Copy.
As a standard rule, ON and OFF will be represented as follows:
1 = ON
0 = OFF
To toggle an option, simple place a space then a 1 or 0 after the
option. ie, this will turn an option on :
OPTION 1
Configuration Options:
RECURSIVE - Recursive mode. Copy files from <source> recusively
to directory <destination>.Same as '-r' option above.
VERBOSE - Verbose Mode. Same as '-v' option.
FIND - Find mode. Does not copy files. There is no need to
specify a destination with this option.. Same as '-f'
option.
NEWONLY - Incremental backup. Compare last modified time and copy
New files only. This will remove files and directories
that have been deleted from the source argument .Same as
'-n' option.
INODECHK - Toggle inode information file comparison checking.
SIZECHK - Toggle file size comparison checking.
SECONDSCHK - Place the maximum time in seconds that comparison
on file modification time can differ between source
and destination files after this . Same as '-s' option.
QUIET - Suppress all error messages.
TRASHBIN - Move all old and deleted files from the last backup to
the specified TRASHBINDIR directory defined below.
NEWONLY option is automatically used when TRASHBIN is
toggled on. Use the TRASHBINDIR option below to
specify the trash bin directory.
TRASHBINDIR - Place a space and then a directory after this
option to specify the trash bin directory. ie.
TRASHBINDIR /my/dir/trashbin
SOURCE - Place a space and then a directory that you
would like to copy your files from. ie.
SOURCE /dir1
DEST - Place a space and then a directory that you
would like to copy your file to. ie.
DEST /dir2
EXCLUDEDIR - place a space and then a 1 or 0 to toggle this
option. Then place the directories or files
that you would like to exclude on individual
lines below the EXCLUDEDIR option followed by
the tag END. ie.
EXCLUDEDIR 1
/exclude/dir2
/dir/to/exclude/dir2
END
V. ACKNOWLEDGMENTS
---------------
I would like to thank the following people for their
contribution to Backup Copy.
Michael Oswell <oswell@xcert.com>
- For porting Backup Copy to HPUX, AIX, IRIX, and SUNOS.
*****
John Quinn <jquinn@soggey.ilo.dec.com>
- For porting Backup Copy to Digital UNIX V4.x gcc 2.8.0.
*****
Karl Iorio <iorio@i-cafe.net>
- For providing excellent beta testing and patch work.
*****
Jeff Trawick <trawick@ibm.net)
- For providing beta testing and partial patches.
*****
Robert Schouwenburg <rds@stack.nl>
- Provided helpful support and beta testing.
VI. CONTACT INFORMATION
-------------------
Author: Kevin Lindsay
klindsay@mkintraweb.com
Report Bugs to: klindsay@mkintraweb.com
VII. SUPPORTED SYSTEMS
-----------------
Linux: Debian, Slackware, Redhat
BSD: FreeBSD 2.2.x
BSDI BSD/OS
AIX, DEC, HP-UX, IRIX, SUNOS.
|