Ubuntu-tz Open new terminal from command line

Atanas Cosmas Nkelame nkelame at udsm.ac.tz
Wed May 6 14:55:18 BST 2009


Hello Max and others, yes rsync is very powerful. Iam still exploring it.

I plan to use it to be mirroring our sites from the main web server to a
backup server later.The plan is to run through a cron job that checks
every 2 days.

But for now I have been using lftp, after I found some restrictions with
regard to SSH access and also because the files are not that sensitive and
so encryption is not that important.

Below is a script (sitebackup.sh) which i have been using.

The challenge so far is when executed sitebackup.sh will download site1,
and when it is done  it can go to site 2 etc. I want to be able to open
multiple tabs (say10) and download 10 sites.

#!/bin/bash
# sitebackup.sh
# Version 20090504V0000.1a

#Change directory to master folder where directories will be created and
files will be downloaded for backup
cd /home/mypc/storage/sitebackups

#SITE 1: www.sitename.go.tz
basesite=site1
datestamp=`date +'%Y%m%d%h%s'`
sitename=$basesite$datestamp
mkdir $sitename
cd /home/mypc/storage/sitebackups/$sitename
#Issue the download instructions through lftp
lftp -u username,password -e "mirror --delete --only-newer --verbose
/httpdocs" www.sitename.go.tz
#NOTE: /httpdocs is a folder where the files are located on the server.

SO FAR IT HAS BEEN WORKING BUT I would like to be able to open multiple
tabs (say10) and download 10 sites.

Atanas





> Hi,
>
> Have you considered using rsync and tar as your backup tool, you can
> create a simple bash script to do that automagically for you and output
> progress >> to a log file.
>
> At least in my case it works wonders for all sorts of backups.
>
> Or you can post a scenario and we try to give you a our views on how we
> would create a backup.
>
> Regards,
>
> Max.
>
> On Wed, 2009-05-06 at 19:43 +0800, Peter Hoeg wrote:
>> If you need to pass parameters to what you are starting you need to
>> quote the string like this:
>>
>> xterm -e "python python.py" &
>>
>> But aren't you making the python script executable so you do not need
>> the first "python" part?
>>
>> xterm -e python.py &
>>
>> would then work.
>>
>> /Peter
>>
>> On Wednesday 06,May,2009 07:25 PM, Atanas Cosmas Nkelame wrote:
>> > Hi Peter,
>> >
>> > Does that mean If I want to open a new window and launch a python
>> script
>> > (called backup.py) will I do the following
>> >
>> > xterm -e python python.py&
>> >
>> >
>> >
>> > Atanas
>> >
>> >
>> >
>> >
>> >> xterm -e<command>  &
>> >>
>> >> As an example: xterm -e htop&
>> >>
>> >> On Wednesday 06,May,2009 06:32 PM, Atanas Cosmas Nkelame wrote:
>> >>> Dear friends,
>> >>>
>> >>> Iam writing a few scripts to assist in some automation work.
>> >>>
>> >>> I would like to be able to Open new terminal from command line.
>> >>>
>> >>> Can someone suggest how this can be done.I will appreciate
>> >>>
>> >>> Iam using ubuntu 9.04
>> >>>
>> >>> Atanas
>> >>> UCC/&TAFOSSA
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> _________________
>> >>>
>> >>> University Computing Centre - 'Professionalism, Customer Care and
>> >>> Technological foresight'
>> >>>
>> >>
>> >> --
>> >> Ubuntu-tz mailing list
>> >> Ubuntu-tz at lists.ubuntu.com
>> >> Modify settings or unsubscribe at:
>> >> https://lists.ubuntu.com/mailman/listinfo/ubuntu-tz
>> >>
>> >
>> >
>> >
>> >
>> > _________________
>> >
>> > University Computing Centre - 'Professionalism, Customer Care and
>> Technological foresight'
>>
>
>
> --
> Ubuntu-tz mailing list
> Ubuntu-tz at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-tz
>




_________________

University Computing Centre - 'Professionalism, Customer Care and Technological foresight'



More information about the Ubuntu-tz mailing list