Gossamer Forum
Home : General : Perl Programming :

Backing up a folder without SSH...

Quote Reply
Backing up a folder without SSH...
Just thought I would share this bit of code;


print "Content-type: text/html \n\n";
print "System: $ENV{'DOCUMENT_ROOT'}";


system("tar -cvvf backup.tar ./");
print "DONE!";

Basically, this will create a backup.tar file for you, which holds the contents of the above folder (permissions should be kept too).

The sole reason for writing this script, was due to the fact that I needed a simple script to backup a clients site; and then get it ready for a transfer to another server (the old server didn't have SSH, but the new one does).

Anyway... for anyone who finds this post useful... enjoy =)


Andy (mod)
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!