LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-15-2002, 09:08 PM   #1
esael
Member
 
Registered: Jul 2002
Posts: 109

Rep: Reputation: 15
Backing-up a folder


Hi,

If I want to back up a folder every midnight, how can I do it?

Esael
 
Old 09-15-2002, 11:09 PM   #2
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
If you have the disk space available I would suggest using the tar comamand. Other devices can also be used of course, if available. For instance if you wanted to backup the /etc dirctory every night at midnight. Add a line in cron using "crontab -e"

0 0 * * * /bin/tar -czf /etcbackup.tar.gz /etc 1>/dev/null 2>/dev/null

At 0 minutes and 0 hours each day /bin/tar will execute and backup the /etc directory tree and put it in the file /etcbackup.tar.gz.

To view the output file use:

tar -tzvf /etcbackup.tar.gz

The example would only work for root crontab becaue only root can write to the top level directory. If a normal user, then create directory like /backups and give full permission to it for the user. I think you could modify as required for your desired application.
 
  


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
Folder Max Size and Limiting SSH access to home folder. Mefistofeles Linux - General 4 11-26-2005 02:09 PM
permissions difference between /home/..../folder and /root/folder darkleaf Linux - General 3 07-21-2005 05:23 PM
backing up remote folder with rsync and ssh ohcarol Linux - Software 6 01-03-2005 12:43 AM
how can i default the max folder file size when it create inside a folder antony_csf Linux - Software 1 06-17-2004 02:26 AM
gnome home folder and trash folder ambelos Linux - Software 2 02-24-2004 06:44 AM


All times are GMT -5. The time now is 05:17 AM.

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