Command Line
You can use the command line to run the DataHaven.NET, here are some examples.
- list of available commands
- register a new user identity
- recover existing user identity
- start, stop DataHaven.NET
- show the user interface window
- start a new backup
- get a list of my backups
- restore existing backup
- add new folder to be able to start backup later
- delete existing backup
- delete folder and all its backups
- set backup schedule for given folder
Register a new user identity
veselin@dell64:~$ datahaven register veselin_penev Copyright DataHaven.NET LTD. of Anguilla, 2006-2012. All rights reserved. [connecting to the identity server] [checking account name] [checking network configuration] [local IP is xxx.xxx.xxx.xxx] [external IP is xxx.xxx.xxx.xxx] [sending my identity to the identity server] [verifying my identity on the server] [new user veselin_penev registered successfully!]
Recover existing user identity
#TODO
Start, stop DataHaven.NET
veselin@dell64:~$ datahaven start 00:00 dhnmain.run want to switch log files 00:00 dhnmain.run UI=[] 00:00 dhnmain.run want to start automats 00:00 new initializer[AT_STARTUP] created with index 0 00:00 dhnmain.run calling reactor.run() 00:00 initializer[AT_STARTUP] fired with event "run" 00:00 dhninit.init_local 00:00 misc.init ...
If you wish to hide the output and run datahaven in background use "nohup":
veselin@dell64:~$ nohup datahaven & [1] 4403 veselin@dell64:~$ nohup: ignoring input and appending output to `nohup.out'
To stop DataHaven.NET:
veselin@dell64:~$ datahaven stop trying to stop pid 4403 trying to stop pid 4417 DataHaven.NET stopped [1]+ Done nohup datahaven
Show the user interface window
veselin@dell64:~$ datahaven show found DataHaven.NET process, pid=[2799]
Start a new backup
If the path contains spaces - you must use double quotes.
veselin@dell64:~$ datahaven backup start "/home/veselin/Downloads/Portable Python 1.1" Copyright DataHaven.NET LTD. of Anguilla, 2006-2012. All rights reserved. /home/veselin/Downloads/Portable Python 1.1 [counting size] total space used: 0 bytes availible space: 2 Gb
Get a list of my backups
veselin@dell64:~$ datahaven backups
Copyright DataHaven.NET LTD. of Anguilla, 2006-2012.
All rights reserved.
/home/veselin/Downloads/Portable Python 1.1 [127.52 MB]
F20120331095631AM [16%] in process
total space used: 127.52 MB
availible space: 2 Gb
Restore existing backup
veselin@dell64:~$ datahaven restore F20120331095631AM ~/python.tar
Copyright DataHaven.NET LTD. of Anguilla, 2006-2012.
All rights reserved.
/home/veselin/Downloads/Portable Python 1.1 [127.52 MB]
F20120331095631AM [85%] restoring
total space used: 127.52 MB
availible space: 2 Gb
Add new folder to be able to start backup later
veselin@dell64:~$ datahaven backups add /home/veselin/Public
...
veselin@dell64:~$ datahaven backup start /home/veselin/Public
Copyright DataHaven.NET LTD. of Anguilla, 2006-2012.
All rights reserved.
/home/veselin/Downloads/Portable Python 1.1 [127.52 MB]
F20120331095631AM [92%] ready
/home/veselin/Public [counting size]
total space used: 127.52 MB
availible space: 2 Gb
Delete existing backup
#TODO
Delete folder and all its backups
veselin@dell64:~$ datahaven backup delete /home/veselin/Public
Copyright DataHaven.NET LTD. of Anguilla, 2006-2012.
All rights reserved.
/home/veselin/Downloads/Portable Python 1.1 [127.52 MB]
F20120331095631AM [92%] ready
total space used: 127.52 MB
availible space: 2 Gb
Set backup schedule for given folder
veselin@dell64:~$ datahaven schedule "/home/veselin/Downloads/Portable Python 1.1" daily.1.20:15 Copyright DataHaven.NET LTD. of Anguilla, 2006-2012. All rights reserved. /home/veselin/Downloads/Portable Python 1.1 next start expected at Sat Mar 31 20:15:00 2012
Here is a brief description of the format for the schedule.
veselin@dell64:~$ datahaven help schedule
Schedule compact format:
[mode].[interval].[time].[details]
mode:
n-none, h-hourly, d-daily, w-weekly, m-monthly
interval:
just a number - how often to restart the task, default is 1
time:
[hour]:[minute]
details:
for weeks: Mon Tue Wed Thu Fri Sat Sun
for months: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
some examples:
n.1.. no schedule
hourly.3 each 3 hours
daily.4.10:15. every 4th day at 10:15
w.1.3:00.MonSat every Monday and Saturday at 3:00 at night
weekly.4.18:45.MonTueWedThuFriSatSun
every day in each 4th week in 18:45
m.5.12:34.JanJul 5th Jan and 5th July at 12:34
List of available commands
veselin@dell64:~$ datahaven help
usage: datahaven [options] [command] [arguments]
Commands:
start start DataHaven.NET
stop stop DataHaven.NET
show start DataHaven.NET and show the main window
register <account name>
generate a new private key and register new account
recover <private-key-filename> [idurl or username]
recover existing account with your private key file
backup list show list of your backup folders
backup start <folder> start a new backup of the given folder
backup add <folder> add backup folder, but not start new backup
backup delete <folder>
remove all backups of the folder
backup delete <backup ID>
remove given backup
backup update request all suppliers to update info for all backups
schedule <folder> <schedule in compact format>
set a schedule for a folder to start backups automaticaly
restore <backup ID> [.tar file location]
restore a given backup
stats <backup ID> show condition of given backup
stats remote <backup ID>
show remote files stats for this backup
stats local <backup ID>
show local files stats for this backup
suppliers list show list of your suppliers
suppliers call send a packets to checks out who is alive
supplier replace <username, number or idurl>
replace a single supplier with new one
help print this message
help schedule print format description to set scheduled backup
Options:
-h, --help show this help message and exit
Log:
-d DEBUG, --debug=DEBUG
set debug level
-q, --quite quite mode, do not print any messages to stdout
-v, --verbose verbose mode, print more messages
-n, --no-logs do not use logs
-o OUTPUT, --output=OUTPUT
print log messages to the file
-t TEMPDIR, --tempdir=TEMPDIR
set location for temporary files, default is
~/.datahaven/temp
--twisted show twisted log messages too
Network:
--tcp-port=TCP_PORT
set tcp port number for incoming connections
--no-upnp do not use UPnP
--no-cspace do not use transport_cspace
© Copyright 2006-2012 DataHaven.NET LTD. of Anguilla. Use of this website and software constitutes acceptance of the
Terms of Use. All rights reserved.