rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] --exclude problems


From: Dominic Raferd
Subject: Re: [rdiff-backup-users] --exclude problems
Date: Thu, 09 Oct 2014 09:13:05 +0100
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

Your problem I think is that bash expands the asterisks, you could try this (note the single quotes):
rdiffoptions='-v4 --print-statistics --exclude **Outlook.pst';
or try escaping the asterisks with backslashes...

To properly overcome Outlook.pst being locked, as you have found you need to create a volume snapshot by executing commands on the source machine (with admin permissions too I think). TimeDicer can do this for you, but it is a push solution and you are trying to pull (so to speak).

Regarding the problem with your windows script using vscsc, I don't think you can just connect from Windows to Linux with -c, instead you need to use something like this:
rdiff-backup.exe [...] --remote-schema "C:\Program Files\Putty\plink.exe %%s rdiff-backup --server" [...]
and of course you have to have plink.exe, which comes with Putty...

Dominic

On 09/10/2014 06:07, Stephen Butler wrote:
Hello Dominic,

Am running program on linux server. Here is the command

rdiff-backup -v4 --print-statistics address@hidden::d:/Users/Steve /mnt/hda1/backup/address@hidden/Steve

I think I've found the problem, I'm creating a shell script that will run on my linux server that uses rdiff-backup and ssh to backup my windows clients back to the linux server.

I'm using:
On the linux server : rdiff-backup 1.2.8 ; sendEmail
On the windows client : openssh for windows from http://www.mls-software.com/opensshd.html ; rdiff-backup 1.2.8 for windows.

I had some trouble with openssh for windows for a while, but got it working with auto public keys eventually.

My script uses variables to build the rdiff-backup command.
For example I have the following variable

rdiffoptions="-v4 --print-statistics";

This is where I should have put my --exclude **Outlook.pst code. It now looks like this

rdiffoptions="-v4 --print-statistics --exclude **Outlook.pst";

I was placing the code where the variables are joined into the command string.
The following way does not work with my script
BakCommand="$rdiffbackup $rdiffoptions --exclude **Outlook.pst address@hidden::$BakSrc $BakDest";

I'm not experienced with bash scripting, and am sure there is a simple rule that I broke.

Thanks to everyone who offered to help.

PS My real problem here is that if outlook is open, its Outlook.pst file will not be copied.

The closest solution i found so far is the following.
ssh into the client from the server and run vscsc in conjuction with rdiff-backup FROM the client in the following way.

Command from linux server : $ ssh address@hidden cmd /C "vscsc -exec=d:/Users/backup.bat d:"

where d:\Users\backup.bat contains
----------------------------
@echo off
DOSDEV B: %1
rdiff-backup -v3 --print-statistics B:/Users/Steve address@hidden::/mnt/hda1/backup/Steve
DOSDEV /D B:
----------------------------

This worked once and now does not work at all, and I get errors saying access denied.



Error ----------------------------------------------- -----------------------------------------------


$ ssh address@hidden cmd /C "vscsc -exec=d:/Users/backup.bat D:"
address@hidden's password:

VSCSC.EXE 3.0 - Volume Shadow Copy Simple Client for Windows 7
This is a modified version of the original Volume Shadow Copy Client
by Microsoft (VSHADOW.EXE), originally bundled with the Microsoft SDK 7
for Windows Vista and Windows 7.


(Option: Execute binary/script after shadow creation 'd:/Users/backup.bat')
(Option: Create shadow copy set)
(Gathering writer metadata...)
(Waiting for the asynchronous operation to finish...)
Initialize writer metadata ...
Discover directly excluded components ...
- Excluding writer 'Shadow Copy Optimization Writer' since it has no selected components for restore.
- Excluding writer 'MSSearch Service Writer' since it has no selected components for restore.
Discover components that reside outside the shadow set ...
- Component '\TasksStore' from writer 'Task Scheduler Writer' is excluded from backup (it requires C:\ in the shadow set)
- Component '\WriterMetadataStore' from writer 'VSS Metadata Store Writer' is excluded from backup (it requires C:\ in the shadow set)
- Component '\PerformanceCounters' from writer 'Performance Counters Writer' is excluded from backup (it requires C:\ in the shadow set)
- Component '\System Files' from writer 'System Writer' is excluded from backup (it requires C:\ in the shadow set)
- Component '\BCD\BCD' from writer 'ASR Writer' is excluded from backup (it requires  in the shadow set)
- Component '\Registry' from writer 'Registry Writer' is excluded from backup (it requires C:\ in the shadow set)
- Component '\WMI' from writer 'WMI Writer' is excluded from backup (it requires C:\ in the shadow set)
- Component '\COM+ REGDB' from writer 'COM+ REGDB Writer' is excluded from backup (it requires C:\ in the shadow set)
Discover all excluded components ...
Discover excluded writers ...
- The writer 'Task Scheduler Writer' is now entirely excluded from the backup:
  (it does not contain any components that can be potentially included in the backup)
- The writer 'VSS Metadata Store Writer' is now entirely excluded from the backup:
  (it does not contain any components that can be potentially included in the backup)
- The writer 'Performance Counters Writer' is now entirely excluded from the backup:
  (it does not contain any components that can be potentially included in the backup)
- The writer 'System Writer' is now entirely excluded from the backup:
  (it does not contain any components that can be potentially included in the backup)
- The writer 'ASR Writer' is now entirely excluded from the backup:
  (the top-level non-selectable component '\BCD\BCD' is an excluded component)
- The writer 'Registry Writer' is now entirely excluded from the backup:
  (it does not contain any components that can be potentially included in the backup)
- The writer 'WMI Writer' is now entirely excluded from the backup:
  (it does not contain any components that can be potentially included in the backup)
- The writer 'COM+ REGDB Writer' is now entirely excluded from the backup:
  (it does not contain any components that can be potentially included in the backup)
Discover explicitly included components ...
Verifying explicitly specified writers/components ...
Select explicitly included components ...
Creating shadow set {ae85d0cf-ad04-484f-a462-95c99491be8b} ...
- Adding volume \\?\Volume{973b9136-61f5-11e3-bf92-806e6f6e6963}\ [D:\] to the shadow set...
Preparing for backup ...
(Waiting for the asynchronous operation to finish...)
(Waiting for the asynchronous operation to finish...)
Creating the shadow (DoSnapshotSet) ...
(Waiting for the asynchronous operation to finish...)
(Waiting for the asynchronous operation to finish...)
Shadow copy set succesfully created.

List of created shadow copies:


Querying all shadow copies with the SnapshotSetID {ae85d0cf-ad04-484f-a462-95c99491be8b} ...

* SNAPSHOT ID = {f19e2d6f-ff62-4054-9b4e-129c786c5dc2} ...
   - Shadow copy Set: {ae85d0cf-ad04-484f-a462-95c99491be8b}
   - Original count of shadow copies = 1
   - Original Volume name: \\?\Volume{973b9136-61f5-11e3-bf92-806e6f6e6963}\ [D:\]
   - Creation Time: 9/10/2014 2:49:46 PM
  B:: The operation completed successfully.
Host key verification failed.
Fatal Error: Truncated header string (problem probably originated remotely)

Couldn't start up the remote connection by executing

    ssh -C address@hidden rdiff-backup --server

Remember that, under the default settings, rdiff-backup must be
installed in the PATH on the remote system.  See the man page for more
information on this.  This message may also be displayed if the remote
version of rdiff-backup is quite different from the local version (1.2.8).
B:: The operation completed successfully.
 - Shadow copy device name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy4
   - Originating machine: steve
   - Service machine: steve
   - Not Exposed
   - Provider id: {b5946137-7b9f-4925-af80-51abd60b20d5}
   - Attributes:  Auto_Release Differential

- Executing command 'd:/Users/backup.bat' ...
-----------------------------------------------------
-----------------------------------------------------
- There were no writer components in this backup

Snapshot creation done.




End Error ----------------------------------------------- -----------------------------------------------

I've tryed combinations of the following.
eval ssh address@hidden cmd /C \\\"runas /user:Steve "vscsc -exec=d:/Users/backup.bat D:"\\\"

But no luck so far.

I think I'll go with my existing script and setup a bat file on client machines that will check for active Outlook.exe process and kill it if found, to be run before the backup is scheduled. This is not an ideal solution.

Thanks,
remus

PS should this be  a new topic ?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]