If you have been looking for a way to Automate a task on Linux, then this is the place for you. We used this in a bid to Automate SquirrelMail Backup on Ubuntu 9.04
Open /etc/crontab and add the following line in it:
50 08 * * * root /bak
This indicates that the executabe file named bak in / will run everyday at 08:50 am
we created the /bak file to backup IMAP folders in SquirrelMail on Ubuntu 9.04
To learn how to schedule a task in Windows, click her...
Wednesday, March 7, 2012
Schedule a task on Windows
If you are looking to Schedule a task on Windows or automate a task on Windows then you have indeed come to the right place. Read on...
We tried this on Windows XP with SP2:
Click on Start button
Click on All Programs
Click on Accessories
Click on System Tools
Click on Scheduled Tasks
Click on File
Click on New
Click on Scheduled Task
Name it what you want to.
Double click on it.
Click on Browse and select the program yo would like to run; in our case it was the batch file that we created here to copy a file from Linux to Windows.
Click on the Schedule tab and schedule task as per your needs.
I used Daily. Set the start time as per your requirement.
This will automatically carry out the task for you at the predefined time. This way I am able to automatically get the file copied from Ubuntu...
Automating SquirrelMail Backup on Ubuntu 9.04
If you are looking to automate SquirrelMail Backup on Ubuntu 9.04 or on any other flavor of Linux for that matter, read on...
Create a file called bak with the following contents and chmod 744 bak to make it executable.
rm /backup/*.ziprm -rf /backup/user_name/usr/local/imap_tools/imapdump.pl -f /backup/user_name -S localhost/user_name@your_domain/user_passwordzip -r /backup/user_name_`date '+%d%m%Y'` /backup/user_name/.
The first line will delete any zipped files existing in the backup folder called backup in this case.
The second line will delete the backup of the IMAP folders that already exist from last time's backup. This is important since if the user had 20 emails in the last backup and he has thereafter deleted 5 emails that he does not require, the numbers get moved...
Restore SquirrelMail Backup
If you are looking to restore SquirrelMail backup, then you can follow the how to here:
First, copy the backup file from Windows to Linux using the instructions here. Or if it is already on Linux, you have nothing to worry about.
cd /backup
where backup is the folder where you backup squirrelmail and zip it.
Just unzip the zipped file by giving the command:
unzip zipfilename -d tmpThis will unzip the folders and files under tmp folder.
If you have followed the instructions on how to Backup SquirrelMail on Ubuntu 9.04 then you will have already copied dumptoIMAP.pl to /usr/local/imap_tools.
Create a user called test using ISPConfig.
The following command will restore the INBOX from SquirrelMail to user testuser.
/usr/local/imap_tools/dumptoIMAP.pl -i localhost/test@genopharma.com/password...
Copy a file from Windows to Linux
If you are looking to copy a file from Win XP to Ubuntu 9.04:
On your Windows PC, download pscp.exe from here.
Suppose you copied the pscp.exe to a folder called linux on D drive and the file you want to transfer from Windows to Linux is bak.zip then the command :
d:\linux\pscp.exe d:\bak.zip linux_user@linux_ip_address:/windows
will copy the d:\bak.zip to a folder called windows under / on Linux.
If you get an error like :
pscp: unable to open <file name>: permission denied.
It means that the linux_user you are looing into the server with does not have write permissions to the specified folder called windows in this case. This folder was probably made by su or at least logged in as sudo su.
Run the following command logged in as sudo su to eliminate this problem.
chown linux_user...
How to copy a file from Linux to Windows
If you are looking to copy a file from Linux to Windows, look no further.
Download pscp.exe from here. The one I downloaded earlier gave me the error : pscp.exe is not a valid win32 application. Hence, I downloaded it from here.
On your Windows PC, create a folder. I created d:\bak on my WIN XP
PC and copied the pscp.exe there. I also ran a batch file
called bak.bat which contains:
pscp.exe -pw users_password user@server_ip_addr:/backup/*.zip d:\bak
This will copy all the zip files from the backup folder on your Linux machine to the bak folder in the D drive of your Windows PC. This was tested on a PC running WIN XP.
If you would like to learn how to copy a file from Windows to Linux, click here....
Zip folder with subfolders in Linux
If you are looking to zip folder in Linux with all its contents including subfolders you can make use of this :
zip -r zip_file_name /path_of_folder_with_subfolders
For example :
zip -r backup /backup/user
will backup the entire contents of /backup/user including files and subfolders to a file backup.z...
How to Backup SquirrelMail on Ubuntu 9.04
If you have been looking for ways to backup SquirrelMail then this is the place for you.
To start with, I found that the emails are stored one in each file in /var/vmail/our-domain-name/user/cur when read and in /var/vmail/our-domain-name/user/new when unread. I tried to make a test user using ISPConfig and copied the mail folder /var/vmail/our-domain-name/user to /var/vmail/our-domain-name/testuser but I did not get the results that I was looking for. After searching the Net and learning a few things, I have come up with this how-to for other Linux enthusiasts so that they can easily backup SquirrelMail.
After logging in as sudo su:
1. Create a folder called imap_tools under /usr/local.
2. Download these files to this folder :
imapdump.pl : This...
Thursday, March 1, 2012
Transfer music from PC to iPhone
Here you will learn how to copy songs from PC to iPhone, copy songs from PC to iPod or copy songs from PC to iPad.
Now that we managed to successfully transfer music files from iPod to PC, we were now asked to transfer the files from PC to iPhone. One can do it using iTunes, but it is always at a risk since the synchronization might happen in the wrong direction and you might be left with your existing files wiped out.
This time we downloaded another software that we got for free, the Copy Trans Suite (Install_CopyTrans_Suite.exe) which we downloaded here. This time we used the Apple iPhone A1387 model. However, when we installed the software, it did not detect the iPhone. We did a restart although it didn't ask us to and thereafter it detected the iPhone as a 4S. We then successfully copied...
Transfer music from iPod to PC
Here you will learn how to copy songs from iPod to PC, copy songs from iPhone to PC or copy songs from iPad to PC.
If you have been looking to find out how to transfer music files from your iPod to your PC, you have indeed come to the right place. You may use iTunes but this is very risky as if you don't turn off the synchronizing option, you can lose all your music files from your iPod.
Hence, we looked for something else other than iTunes.We used iPod PC Transfer Suite (ipssetup.exe) which we downloaded here. This is a software that can be purchased for something like $30. In this free trial, you can save the music files to compute but then you have to click on each one and save manually; you cannot save them all at one shot for which you have to purchase the software. This was...