Seiten

Dienstag, 5. Mai 2015

BackupGoo Command-Line for Domains

Over the last months we have made substantial changes to BackupGoo's command-line version. With this Blog entry we would like show you how to use it with your Google Apps Domain.

Overview

There are 4 scripts to BackupGoo's command-line with which you can control everything and start your backup. The command-line package from our website contains those 4 scripts for Unix systems ending in .sh and Windows systems ending in .bat. Depending on the system you work on, you can get rid of the scripts you don't need. All you need to do is to extract the archive and run a script.

backupgoo-domains
This is your entry point for setting up a domain. Besides adding domains you can delete domains or list all your registered domains. A full help list with all options can be printed using the script without any parameters.

backupgoo-setup
That is the central place for changing all your options in BackupGoo. Additionally you can set up the authentication system for your domain. Options include turning on or off the backup of different Google services, changing the backup directory, setting the backup of multiple user in parallel, turning on or off the backup of special Gmail labels or Drive folders and many more. A full help can be printed using backupgoo-setup without any parameters.

backupgoo-backup
Call this script without any parameters to start the backup. Two minor parameter options allow for selecting a specific domain or accounts file to start the backup with a fraction of your domains and accounts (if you have created such files). Otherwise the backup will start with all registered domains.

backupgoo-accounts
The accounts script allows for manually adding or removing accounts for your domains. Normally BackupGoo will fetch all your accounts automatically once you register a domain, but here you can do that manually. Besides removing and adding accounts, this script allows for listing all accounts. A help menu can be printed with the -h parameter.


Setting up a Domain

Simply call:
backupgoo-domains -a adminEmail@domain.com -d domain.com

After that, if you are setting up a domain for the first time, BackupGoo will show you a message, that there is no domain authentication system in place:

For the domain authentication you only need 2 files. You can get them following our guideline:
http://blog-en.backupgoo.com/2014/01/backupgoo-oauth-20-domain-authentication.html

and provide them with the setup script:
backupgoo-setup -ds /path/to/clients/secrets/ -pk /path/to/pk12/file

BackupGoo will then ask you to grant BackupGoo access to your domain:

after adding the scopes in your domain security page proceed. BackupGoo will fetch all your domain accounts automatically and you are done.


Changing Options

backupgoo-setup
is the script for all options. We will explain some of them here:

backupgoo-setup -p 10
Will let BackupGoo backup 10 of your domain accounts in parallel. This is important as it speeds up the backup time and makes full use of your bandwidth. If you have enough free memory you can also raise the number.

backupgoo-setup -am true
This will activate the backup of Gmail's "All Mail" label. This is important because not all mails are stored under labels and you will make sure all emails are being backed up.

backupgoo-setup -d /path/to/new/directory
The -d option will change your backup directory path (i.e. you want to save to an external or network drive or Cloud storage hung into your system)

backupgoo-setup -sh true
That's a Drive Service option turning on the backup of Drive files that are shared with a domain account. If a user shares a document with 10 people in the domain, for all 10 people this document will be backed up. If this is turned off, only the owner will have backups of that document.

backupgoo-setup -key <license>
With this option you can enter a BackupGoo license key, e.g. after a purchase or your test license for extended testing.

backupgoo-setup -a false
This will turn off (or on) the automatic fetching of domain users.

Starting the Backup

Simply call backupgoo-backup without any parameters.

Adding or Removing Domain Users Manually

BackupGoo will automatically remove all domain users, that are deleted from your Google Domain. But there is an option to turn of the automatic user fetching for domain users. If the automatic user fetching is off, you would need to add domain users manually. To do that you simply call:

backupgoo-accounts -a user1@domain.com user2@domain.com user3@domain.com ...

In the same way you can remove users from any domain, but with the  -r parameter:

backupgoo-accounts -r user1@domain.com user2@domain.com user1@domain2.com ...

With backupgoo-accounts -l you can list all accounts currently stored.


1 Kommentar: