Highlighted
Absent Member.
Absent Member.
4599 views

Groupwise Backup with DBCOPY + RSYNC

Dbcopy allows me to backup but over several weeks the destination folder get large

I was thinking out using Rsync

My GW is on a volume (ext3) called gw
I've added another volume gwbak

I'm currently doing a rm -r /gwbak to delete the backup once a week

This takes some 4hours to remove and dbcopy

I was thinking of using rsync remove files no long in the source

ie. rsync -av --delete-after /gw/ /gwbak

then use DBcopy to copy the live files

dbcopy -p /gw/gwpo /gwbak/gwpo
dpcopy -d /gw/gwdom /gwbak/gwdom

Would this safe (obviously need to make sure not mixing up source & destination !!

Any pitfalls ?
Labels (2)
0 Likes
12 Replies
Highlighted
Knowledge Partner
Knowledge Partner

Re: Groupwise Backup with DBCOPY + RSYNC

bhrt60;2251317 wrote:
Dbcopy allows me to backup but over several weeks the destination folder get large

I was thinking out using Rsync

My GW is on a volume (ext3) called gw
I've added another volume gwbak

I'm currently doing a rm -r /gwbak to delete the backup once a week

This takes some 4hours to remove and dbcopy

I was thinking of using rsync remove files no long in the source

ie. rsync -av --delete-after /gw/ /gwbak

then use DBcopy to copy the live files

dbcopy -p /gw/gwpo /gwbak/gwpo
dpcopy -d /gw/gwdom /gwbak/gwdom

Would this safe (obviously need to make sure not mixing up source & destination !!

Any pitfalls ?


Sure, that combo works well. I run dbcopy first and then run rsync after that to sync the po/ofmsg/ & po/ofuser/index/ folders.

Other than making sure you are running the sync the correct way round and making sure the last path slashes are included, it sould work as you expect.

There is at least one example of the script I use in these forums. Let me see if I can find it.

Cheers,
Willem
0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Groupwise Backup with DBCOPY + RSYNC

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Groupwise Backup with DBCOPY + RSYNC

FYI - DBcopy does NOT work as expected !

Having made a Backup using DBCOPY

dbcopy -d /source /destination
dbcopy -p /source /destination

I stopped GW and deleted the LIVE Domain & PO
Copied back - this time with simple CP command (with agents down)

Domain and PO start up file
GWIA did not

contacted NTS - jumped through the hoops (assumed they knew what they were doing)
created defer and other folder
checked database path in consoleone

(psst! - nothing had changed ! - but I did as requested)

anyway, to cut a long story short ....

It is necessary to down the Agents and Copy the DOMAIN folder 1st time around

After that DBcopy as above does allow you to backup and restore in case of problems

---------------------------------------------------------------
Of course its entirely possible this is in the docs somewhere and I have missed it
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Groupwise Backup with DBCOPY + RSYNC

On 3/24/2013 12:36 PM, bhrt60 wrote:
>
> FYI - DBcopy does NOT work as expected !
>
> Having made a Backup using DBCOPY
>
> dbcopy -d /source /destination
> dbcopy -p /source /destination
>
> I stopped GW and deleted the LIVE Domain & PO
> Copied back - this time with simple CP command (with agents down)
>
> Domain and PO start up file
> GWIA did not
>
> contacted NTS - jumped through the hoops (assumed they knew what they
> were doing)
> created defer and other folder
> checked database path in consoleone
>
> (psst! - nothing had changed ! - but I did as requested)
>
> anyway, to cut a long story short ....
>
> It is necessary to down the Agents and Copy the DOMAIN folder 1st time
> around
>
> After that DBcopy as above does allow you to backup and restore in case
> of problems
>
> ---------------------------------------------------------------
> Of course its entirely possible this is in the docs somewhere and I
> have missed it
>
>

You might also consider GWAVA Reload. It uses dbcopy too, but adds a lot
of nice automated features. It also does incremental backups using
symlinks, saving TONS of disk space.
0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Groupwise Backup with DBCOPY + RSYNC

bhrt60;2254472 wrote:
..
It is necessary to down the Agents and Copy the DOMAIN folder 1st time around

After that DBcopy as above does allow you to backup and restore in case of problems


As mentioned in your other thread, try doing the copy, adding -m switch to your script.

Cheers,
Willem
0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: Groupwise Backup with DBCOPY + RSYNC

magic31;2251328 wrote:
Sure, that combo works well. I run dbcopy first and then run rsync after that to sync the po/ofmsg/ & po/ofuser/index/ folders.

Cheers,
Willem


I just delete the backup location once per week with `rm -R`. Though using rsync looks more efficient, but wouldn't you be better off running the rsync against the WHOLE PO, to be sure to clean up all the extra files?

-- Gordon
0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Groupwise Backup with DBCOPY + RSYNC

gordon_mzano;2312149 wrote:
I just delete the backup location once per week with `rm -R`. Though using rsync looks more efficient, but wouldn't you be better off running the rsync against the WHOLE PO, to be sure to clean up all the extra files?

-- Gordon


Using the rsync method over cleaning out the backup location is indeed more efficient, as it speeds up the process and lowers the overall load. Additionally, as the dbcopy job also does not have to run as long as when a full dbcopy runs, you minimize the chance of possible inconsistencies between databases.

That's possible (rsync the whole PO), if you want to do that it is definitely best to first run the rsync job and followed by the dbcopy job. However, the bulk difference between the live side and restore/backup location is found within the [po]/offiles & [po]/ofuser/index.

The benefit of letting history build up, mainly in [po]/ofmsg & the root of [po]/ofuser has the benefit (imo) that a small set of files will be let to build up that might have historic value. Mostly old user databases that have been deleted in the GroupWise system but than can still be recovered (as last existing version of a user database before the account was removed) if needed.

Rather than rsync'ing the whole PO, you could also consider adding some lines to the script to clean up junk files like logs, temporary files, queues and the like.


Cheers,
Willem
0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: Groupwise Backup with DBCOPY + RSYNC

magic31;2312152 wrote:

Rather than rsync'ing the whole PO, you could also consider adding some lines to the script to clean up junk files like logs, temporary files, queues and the like.


That's getting too complicated for me, I like K.I.S.S!
Do you know if running rsync against a live PO can cause inconsistencies or corrupt files? Or is it more the case that if a GW process has a file locked, rsync will skip it?

It would be perfect if dbcopy had a build in ability to sync/mirror like rsync!

Cheers
-- Gordon
0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Groupwise Backup with DBCOPY + RSYNC

gordon_mzano;2312187 wrote:
That's getting too complicated for me, I like K.I.S.S!


I like to follow that same method. As long as K.I.D.S. is also being considered. (dependable) 🙂

gordon_mzano;2312187 wrote:
Do you know if running rsync against a live PO can cause inconsistencies or corrupt files?


Possible yes, in any case I'd not recommend using it against a live PO.

gordon_mzano;2312187 wrote:
Or is it more the case that if a GW process has a file locked, rsync will skip it?


I think the file will be copied, not sure as I haven't looked/tested how it behaves. The difference with dbcopy vs rsync, is that dbcopy is aware of the GroupWise database and while copying "tells" GroupWise not to try and modify the database that is being copied. So while the file is copied, changes will be queued and written out to the file when dbcopy has finished coping. Rsync won't lock anything AFAIK, just copy... and then modifications to the source file might occur in the middle of the copy process.

gordon_mzano;2312187 wrote:
It would be perfect if dbcopy had a build in ability to sync/mirror like rsync!


That would be a good addition and more efficient indeed, though the given combo with dbcopy and rsync work fine together. 🙂

Cheers,
Willem
0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: Groupwise Backup with DBCOPY + RSYNC

magic31;2312209 wrote:
I
Possible yes, in any case I'd not recommend using it [rsync] against a live PO.
Cheers,
Willem


This sounds like a good way to stay safe. So I hope then that the OP and others who clean up the dbcopies with `rsync --delete`, are shutting down the PO first.
0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Groupwise Backup with DBCOPY + RSYNC

gordon_mzano;2312238 wrote:
This sounds like a good way to stay safe. So I hope then that the OP and others who clean up the dbcopies with `rsync --delete`, are shutting down the PO first.


Well, the OP is running dbcopy after the rsync... so that should be ok.

I also noticed the link to the script I use is broken (I'll fix that too), but here's the link just in case you haven't seen it : https://forums.novell.com/showthread.php/455580-Dbcopy-Restore-question?p=2195713#post2195713

That's been working well for me for the last couple of years.

Cheers,
Willem
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.