summaryrefslogtreecommitdiff
path: root/bin/bbackupd
diff options
context:
space:
mode:
Diffstat (limited to 'bin/bbackupd')
-rw-r--r--bin/bbackupd/BackupClientContext.cpp5
-rw-r--r--bin/bbackupd/BackupClientContext.h5
-rw-r--r--bin/bbackupd/BackupClientDeleteList.cpp5
-rw-r--r--bin/bbackupd/BackupClientDeleteList.h5
-rw-r--r--bin/bbackupd/BackupClientDirectoryRecord.cpp15
-rw-r--r--bin/bbackupd/BackupClientDirectoryRecord.h5
-rw-r--r--bin/bbackupd/BackupClientInodeToIDMap.cpp5
-rw-r--r--bin/bbackupd/BackupClientInodeToIDMap.h5
-rw-r--r--bin/bbackupd/BackupDaemon.cpp7
-rw-r--r--bin/bbackupd/BackupDaemon.h5
-rw-r--r--bin/bbackupd/Win32BackupService.cpp5
-rw-r--r--bin/bbackupd/Win32BackupService.h5
-rw-r--r--bin/bbackupd/Win32ServiceFunctions.cpp5
-rw-r--r--bin/bbackupd/Win32ServiceFunctions.h5
-rwxr-xr-xbin/bbackupd/bbackupd-config37
-rwxr-xr-xbin/bbackupd/bbackupd-config.in38
-rw-r--r--bin/bbackupd/bbackupd.cpp5
17 files changed, 93 insertions, 69 deletions
diff --git a/bin/bbackupd/BackupClientContext.cpp b/bin/bbackupd/BackupClientContext.cpp
index ee8ffdd7..a23bed8a 100644
--- a/bin/bbackupd/BackupClientContext.cpp
+++ b/bin/bbackupd/BackupClientContext.cpp
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
diff --git a/bin/bbackupd/BackupClientContext.h b/bin/bbackupd/BackupClientContext.h
index 7d42a93e..74390319 100644
--- a/bin/bbackupd/BackupClientContext.h
+++ b/bin/bbackupd/BackupClientContext.h
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
diff --git a/bin/bbackupd/BackupClientDeleteList.cpp b/bin/bbackupd/BackupClientDeleteList.cpp
index 2e154b50..5f444204 100644
--- a/bin/bbackupd/BackupClientDeleteList.cpp
+++ b/bin/bbackupd/BackupClientDeleteList.cpp
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
diff --git a/bin/bbackupd/BackupClientDeleteList.h b/bin/bbackupd/BackupClientDeleteList.h
index 71a668a5..afb7f028 100644
--- a/bin/bbackupd/BackupClientDeleteList.h
+++ b/bin/bbackupd/BackupClientDeleteList.h
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.cpp b/bin/bbackupd/BackupClientDirectoryRecord.cpp
index 0d3300cb..0720b40c 100644
--- a/bin/bbackupd/BackupClientDirectoryRecord.cpp
+++ b/bin/bbackupd/BackupClientDirectoryRecord.cpp
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
@@ -314,9 +315,13 @@ void BackupClientDirectoryRecord::SyncDirectory(BackupClientDirectoryRecord::Syn
if(st.st_dev != dir_st.st_dev)
{
- rParams.GetProgressNotifier()
- .NotifyMountPointSkipped(this,
- filename);
+ if(!(rParams.mrContext.ExcludeDir(
+ filename)))
+ {
+ rParams.GetProgressNotifier()
+ .NotifyMountPointSkipped(
+ this, filename);
+ }
continue;
}
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.h b/bin/bbackupd/BackupClientDirectoryRecord.h
index 3a33ed95..1c125fef 100644
--- a/bin/bbackupd/BackupClientDirectoryRecord.h
+++ b/bin/bbackupd/BackupClientDirectoryRecord.h
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
diff --git a/bin/bbackupd/BackupClientInodeToIDMap.cpp b/bin/bbackupd/BackupClientInodeToIDMap.cpp
index eb2842b1..815a3464 100644
--- a/bin/bbackupd/BackupClientInodeToIDMap.cpp
+++ b/bin/bbackupd/BackupClientInodeToIDMap.cpp
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
diff --git a/bin/bbackupd/BackupClientInodeToIDMap.h b/bin/bbackupd/BackupClientInodeToIDMap.h
index 806bf964..c0bde56e 100644
--- a/bin/bbackupd/BackupClientInodeToIDMap.h
+++ b/bin/bbackupd/BackupClientInodeToIDMap.h
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp
index 24fa0a24..f15a9ef9 100644
--- a/bin/bbackupd/BackupDaemon.cpp
+++ b/bin/bbackupd/BackupDaemon.cpp
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
@@ -1795,7 +1796,7 @@ void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Con
ASSERT(mountPoints.size() > 0);
#ifndef NDEBUG
{
- std::set<std::string, mntLenCompare>::const_reverse_iterator i(mountPoints.rbegin());
+ std::set<std::string, mntLenCompare>::reverse_iterator i(mountPoints.rbegin());
ASSERT(*i == "/");
}
#endif // n NDEBUG
diff --git a/bin/bbackupd/BackupDaemon.h b/bin/bbackupd/BackupDaemon.h
index e2d7846f..ee53ab06 100644
--- a/bin/bbackupd/BackupDaemon.h
+++ b/bin/bbackupd/BackupDaemon.h
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
diff --git a/bin/bbackupd/Win32BackupService.cpp b/bin/bbackupd/Win32BackupService.cpp
index d275c891..ac358f2d 100644
--- a/bin/bbackupd/Win32BackupService.cpp
+++ b/bin/bbackupd/Win32BackupService.cpp
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
diff --git a/bin/bbackupd/Win32BackupService.h b/bin/bbackupd/Win32BackupService.h
index e71c93c5..917649ff 100644
--- a/bin/bbackupd/Win32BackupService.h
+++ b/bin/bbackupd/Win32BackupService.h
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
diff --git a/bin/bbackupd/Win32ServiceFunctions.cpp b/bin/bbackupd/Win32ServiceFunctions.cpp
index 276d004f..42a02327 100644
--- a/bin/bbackupd/Win32ServiceFunctions.cpp
+++ b/bin/bbackupd/Win32ServiceFunctions.cpp
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
diff --git a/bin/bbackupd/Win32ServiceFunctions.h b/bin/bbackupd/Win32ServiceFunctions.h
index f85929b8..6f03b9af 100644
--- a/bin/bbackupd/Win32ServiceFunctions.h
+++ b/bin/bbackupd/Win32ServiceFunctions.h
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
diff --git a/bin/bbackupd/bbackupd-config b/bin/bbackupd/bbackupd-config
index 880f2e97..37847d7e 100755
--- a/bin/bbackupd/bbackupd-config
+++ b/bin/bbackupd/bbackupd-config
@@ -1,12 +1,13 @@
#!/usr/bin/perl
-# distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+# distribution boxbackup-0.11rc2 (svn version: 2072)
#
-# Copyright (c) 2003 - 2006
+# Copyright (c) 2003 - 2008
# Ben Summers and contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
+#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
@@ -53,15 +54,19 @@ Setup bbackupd config utility.
Bad command line parameters.
Usage:
- bbackupd-config config-dir backup-mode account-num server-hostname working-dir backup-dir [more backup directories]
-
-config-dir usually /etc/box
-backup-mode is lazy or snapshot
- lazy mode runs continously, uploading files over a specified age
- snapshot mode uploads a snapshot of the filesystem when instructed explicitly
-account-num (hexdecimal) and server-hostname as supplied from the server administrator
-working-dir usually /var/bbackupd
-backup-dir, list of directories to back up
+ bbackupd-config config-dir backup-mode account-num server-hostname
+ working-dir [backup directories]
+
+Parameters:
+ config-dir is usually /etc/box
+ backup-mode is lazy or snapshot:
+ lazy mode runs continously, uploading files over a specified age
+ snapshot mode uploads a snapshot of the filesystem when instructed
+ explicitly, using bbackupctl sync
+ account-num (hexdecimal) and server-hostname
+ are supplied by the server administrator
+ working-dir is usually /var/run
+ backup directories is list of directories to back up
__E
print "=========\nERROR:\n",$_[0],"\n\n" if $_[0] ne '';
@@ -165,8 +170,6 @@ Note: If other file systems are mounted inside these directories, then
they will NOT be backed up. You will have to create separate locations for
any mounted filesystems inside your backup locations.
-WARNING: Directories not checked against mountpoints. Check mounted filesystems manually.
-
__E
# create directories
@@ -307,7 +310,7 @@ Subject: \$SUBJECT (unknown)
To: \$SENDTO
-The backup daemon on $hostname reported an unknown error.
+The backup daemon on $hostname reported an unknown error (\$1).
==========================
FILES MAY NOT BE BACKED UP
@@ -468,7 +471,7 @@ MaximumDiffingTime = 120
# Where the command socket is created in the filesystem.
-CommandSocket = /var/run/bbackupd.sock
+CommandSocket = $working_dir/bbackupd.sock
# Uncomment the StoreObjectInfoFile to enable the experimental archiving
# of the daemon's state (including client store marker and configuration)
@@ -481,7 +484,7 @@ CommandSocket = /var/run/bbackupd.sock
Server
{
- PidFile = /var/run/bbackupd.pid
+ PidFile = $working_dir/bbackupd.pid
}
@@ -601,7 +604,7 @@ What you need to do now...
4) You may wish to read the configuration file
$config_file
- and adjust as appropraite.
+ and adjust as appropriate.
There are some notes in it on excluding files you do not
wish to be backed up.
diff --git a/bin/bbackupd/bbackupd-config.in b/bin/bbackupd/bbackupd-config.in
index adb5d5e6..16ddb75c 100755
--- a/bin/bbackupd/bbackupd-config.in
+++ b/bin/bbackupd/bbackupd-config.in
@@ -15,15 +15,19 @@ Setup bbackupd config utility.
Bad command line parameters.
Usage:
- bbackupd-config config-dir backup-mode account-num server-hostname working-dir backup-dir [more backup directories]
-
-config-dir usually /etc/box
-backup-mode is lazy or snapshot
- lazy mode runs continously, uploading files over a specified age
- snapshot mode uploads a snapshot of the filesystem when instructed explicitly
-account-num (hexdecimal) and server-hostname as supplied from the server administrator
-working-dir usually /var/bbackupd
-backup-dir, list of directories to back up
+ bbackupd-config config-dir backup-mode account-num server-hostname
+ working-dir [backup directories]
+
+Parameters:
+ config-dir is usually @sysconfdir_expanded@/box
+ backup-mode is lazy or snapshot:
+ lazy mode runs continously, uploading files over a specified age
+ snapshot mode uploads a snapshot of the filesystem when instructed
+ explicitly, using bbackupctl sync
+ account-num (hexdecimal) and server-hostname
+ are supplied by the server administrator
+ working-dir is usually @localstatedir_expanded@
+ backup directories is list of directories to back up
__E
print "=========\nERROR:\n",$_[0],"\n\n" if $_[0] ne '';
@@ -53,7 +57,7 @@ __E
}
# default locations
-my $default_config_location = '/etc/box/bbackupd.conf';
+my $default_config_location = '@sysconfdir_expanded@/box/bbackupd.conf';
# command line parameters
my ($config_dir,$backup_mode,$account_num,$server,$working_dir,@tobackup) = @ARGV;
@@ -127,8 +131,6 @@ Note: If other file systems are mounted inside these directories, then
they will NOT be backed up. You will have to create separate locations for
any mounted filesystems inside your backup locations.
-WARNING: Directories not checked against mountpoints. Check mounted filesystems manually.
-
__E
# create directories
@@ -269,7 +271,7 @@ Subject: \$SUBJECT (unknown)
To: \$SENDTO
-The backup daemon on $hostname reported an unknown error.
+The backup daemon on $hostname reported an unknown error (\$1).
==========================
FILES MAY NOT BE BACKED UP
@@ -430,7 +432,7 @@ MaximumDiffingTime = 120
# Where the command socket is created in the filesystem.
-CommandSocket = /var/run/bbackupd.sock
+CommandSocket = $working_dir/bbackupd.sock
# Uncomment the StoreObjectInfoFile to enable the experimental archiving
# of the daemon's state (including client store marker and configuration)
@@ -443,7 +445,7 @@ CommandSocket = /var/run/bbackupd.sock
Server
{
- PidFile = /var/run/bbackupd.pid
+ PidFile = $working_dir/bbackupd.pid
}
@@ -563,7 +565,7 @@ What you need to do now...
4) You may wish to read the configuration file
$config_file
- and adjust as appropraite.
+ and adjust as appropriate.
There are some notes in it on excluding files you do not
wish to be backed up.
@@ -575,7 +577,7 @@ What you need to do now...
more files will be backed up. You want to know about this.
6) Start the backup daemon with the command
- /usr/local/bin/bbackupd$daemon_args
+ @bindir_expanded@/bbackupd$daemon_args
in /etc/rc.local, or your local equivalent.
Note that bbackupd must run as root.
__E
@@ -585,7 +587,7 @@ if($backup_mode eq 'snapshot')
7) Set up a cron job to run whenever you want a snapshot of the
file system to be taken. Run the command
- /usr/local/bin/bbackupctl -q$ctl_daemon_args sync
+ @bindir_expanded@/bbackupctl -q$ctl_daemon_args sync
__E
}
print <<__E;
diff --git a/bin/bbackupd/bbackupd.cpp b/bin/bbackupd/bbackupd.cpp
index c8320454..516698db 100644
--- a/bin/bbackupd/bbackupd.cpp
+++ b/bin/bbackupd/bbackupd.cpp
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright