Commit Graph

44 Commits

Author SHA1 Message Date
Wayne Davison
ba679d5194 In make_simple_backup(), if the rename() failed because we tried
to rename a directory over a file or visa versa, try to handle it.
2005-02-22 01:57:58 +00:00
Wayne Davison
4f5b0756df John E. Malmberg convinced me to standardize on #ifs for defined
values instead of non-zero.
2005-02-14 00:53:43 +00:00
Wayne Davison
4875d6b64d Adding more calls to safe_fname(). 2005-02-07 20:36:43 +00:00
Wayne Davison
7842418b7b Renamed several exclude-related functions/variables using new
filter terminology.
2005-01-25 10:39:14 +00:00
Wayne Davison
018b28328c No need for conditional code around do_lstat() anymore. 2005-01-19 19:30:29 +00:00
Wayne Davison
4f4b2f0927 The device-handling code is no longer omitted based on HAVE_MKNOD
(this is because do_mknod() might be using a different function
to handle fifos and sockets without the help of mknod().
2004-10-01 06:58:23 +00:00
Wayne Davison
29fe3961ab Output the same backup-message prefix when verbose > 1 regardless of
the setting of --backup-dir.
2004-09-20 19:46:45 +00:00
Wayne Davison
fb22c2774d Got rid of a superfluous static buffer. 2004-09-20 05:01:38 +00:00
Wayne Davison
c94e4afbfa Moved the code that determines the backup filename into a new function
named get_backup_name().
2004-09-07 21:29:26 +00:00
Wayne Davison
f8c8ef9eac When we say we're skipping a non-regular file, actually skip it. 2004-09-07 19:49:09 +00:00
Wayne Davison
3cb22c204c Made a comment better. 2004-07-26 05:38:02 +00:00
Wayne Davison
394bcdb5e3 If we sucessfully renamed a file that has multiple links to it, unlink()
it to ensure that rename() didn't lie to us (which it does if you try to
rename() a file over another link to the same file).
2004-07-22 22:52:39 +00:00
Wayne Davison
9fd62d1588 The mkdir code should be using do_stat(), not do_lstat() to copy
each existing dir's mode & owner info.
2004-06-10 16:43:52 +00:00
Wayne Davison
d62bcc17f3 Changed rprintf() calls that included strerror() to use rsyserr(). 2004-05-15 19:31:10 +00:00
Wayne Davison
5291364f1d Don't force the modtime on our backup dirs -- the dirs in the
backup hierarchy should have their own timestamps.
2004-05-13 06:34:03 +00:00
Wayne Davison
377dbd2075 Calls to make_bak_dir() should only happen when we fail to create a
file/dir/etc. with errno == ENOENT.
2004-05-04 03:10:45 +00:00
Wayne Davison
3d06165389 Check robust_rename()'s return value using < 0. 2004-03-13 20:18:03 +00:00
Wayne Davison
9d78ed31a7 A couple fixes from Shinichi Maruyama. 2004-02-23 07:03:03 +00:00
Wayne Davison
62c9e6b3a5 Moved the EXDEV handling into robust_rename(). 2004-02-17 23:13:10 +00:00
Wayne Davison
de0e225076 - Revised and optimized the directory-making code.
- Optimized the keep_backup() code.
2004-02-11 05:02:21 +00:00
Wayne Davison
65d6212d03 Got rid of hard-link message (since I don't think it was ever
output in older rsync versions).
2004-02-11 02:33:17 +00:00
J.W. Schultz
62125b10c9 Simplified test for hardlink in make_backup debug message to
avoid core-dump.
2004-02-10 23:23:09 +00:00
J.W. Schultz
9935066b70 Make idev, hlink and file_struct + strings use allocation
pools.
2004-02-10 03:23:37 +00:00
Wayne Davison
f3af206d8d Changed args to make_file() and free_file(). 2004-02-02 05:06:34 +00:00
Wayne Davison
91a1e147ae Changed F_HEAD to F_HLINDEX. 2004-01-25 22:32:07 +00:00
Wayne Davison
5d2a707139 Use new stringjoin() and pathjoin() functions. 2004-01-20 05:24:07 +00:00
Wayne Davison
aa23c22004 Changed the hard-link check. 2004-01-12 03:50:07 +00:00
Wayne Davison
728d092201 Use the new union-ified flist_struct values. 2004-01-11 07:28:45 +00:00
Wayne Davison
addf0c4a1c A few formatting tweaks. 2004-01-05 03:56:19 +00:00
Wayne Davison
ea42541fe0 Improved file-related error messages by using the new
full_fname() function.
2003-09-11 04:53:05 +00:00
Wayne Davison
14820f635d Make extra backup dirs mode 0700, not 0755. 2003-08-22 00:30:46 +00:00
Wayne Davison
daa8ce838b Use the new backup_suffix_len and backup_dir_len variables. Got rid
of the suffix_specified kludge.
2003-08-01 07:58:41 +00:00
J.W. Schultz
47d6a60c2f Whitespace and indentation fixes. 2003-07-31 09:32:15 +00:00
Wayne Davison
af1d91c562 Call make_file() using the revised arg syntax and new defines. 2003-07-01 21:45:07 +00:00
David Dykstra
759ac87019 Submit enhancement from Michael Zimmerman to allow --suffix to be used
with --backup-dir.
2002-05-09 21:44:46 +00:00
Andrew Tridgell
8950ac03f8 imported new snprintf.c from samba, got rid of slprintf 2001-05-07 06:59:37 +00:00
Martin Pool
a039749b4c Print strerror when a system error occurs; add a new function rsyserr
to do this.  This is not used in every case yet -- I've just changed a
few cases that were causing trouble.  Please convert others as you see them.
2000-10-26 07:24:18 +00:00
Andrew Tridgell
f2cbf44ba5 added an explicit noexcludes flag to make_file() 2000-08-19 12:51:26 +00:00
Andrew Tridgell
b7c33e3bde fixed backup_dir bug introduced with recent memory handling patches 2000-08-19 11:06:04 +00:00
Andrew Tridgell
3d38277706 optimisations from Rich Salz <rsalz@caveosystems.com> 2000-07-29 04:52:05 +00:00
Andrew Tridgell
49d6fdc036 patch from Jim Delahanty <mail_us@swbell.net> to ensure files are
deleted after being backed up in a rename operation
2000-01-30 00:56:43 +00:00
Andrew Tridgell
378a074c82 patch from James Delahanty <jimd@gie.com> to make --backup-dir work
cross-filesystem
2000-01-27 02:45:56 +00:00
Andrew Tridgell
66203a982b added --backup-dir option from Bob Edwards
this is very useful for incremental backups
2000-01-24 04:58:53 +00:00
Andrew Tridgell
3d19b4c83e separated out the make_backup code in preparation for some patches
from Bob Edwards
1999-08-30 08:19:47 +00:00