LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-24-2004, 07:00 AM   #1
ferret_dude
LQ Newbie
 
Registered: May 2004
Posts: 5

Rep: Reputation: 0
simple backup script needed


I need a simple script witch compress all files in a directory
The script should automatically sett the file name to the current date ,
After transferring the file to a remote server the script shall delete the tar.gz file it made

That is about it

Stig



Last edited by ferret_dude; 05-24-2004 at 07:01 AM.
 
Old 05-24-2004, 07:46 AM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,328

Rep: Reputation: 72
well, nothing complicated. for compress and date, use tar and...date.

for the remote serveur you have to precise the connection protocol if you want help for that
 
Old 05-24-2004, 08:16 AM   #3
ferret_dude
LQ Newbie
 
Registered: May 2004
Posts: 5

Original Poster
Rep: Reputation: 0
what about giving a an example of how the script may look like ?
the problem is how to insert the date into the filename . BTW i want it to be in MM/DD/YY format
 
Old 05-24-2004, 08:32 AM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,328

Rep: Reputation: 72
well here is a short example (do man date to fine tunning) :

today=`date +%m-%d-%y`
tar -c -z -f "$today.tar.gz" /your/dir/to/backup

Edit : I formated the date according to your wish (MM/DD/YY)



Last edited by keefaz; 05-24-2004 at 08:36 AM.
 
Old 05-24-2004, 08:45 AM   #5
ferret_dude
LQ Newbie
 
Registered: May 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks alot i wil give it a try
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Simple help with a backup script GraemeK Linux - Software 1 05-20-2005 11:43 PM
simple-backup-script ahmed4linux Linux - General 1 05-04-2005 07:10 PM
simple MySQL backup Thulemanden Linux - Software 1 02-09-2004 03:03 PM
Backup script needed jmirles Programming 1 09-27-2003 08:50 AM


All times are GMT -5. The time now is 05:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration