Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


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

Rep: Reputation: 15
Backing-up a folder


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

Old 09-16-2002, 12:09 AM   #2
Senior Member
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 46
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.


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 03:09 PM
permissions difference between /home/..../folder and /root/folder darkleaf Linux - General 3 07-21-2005 06:23 PM
backing up remote folder with rsync and ssh ohcarol Linux - Software 6 01-03-2005 01: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 03:26 AM
gnome home folder and trash folder ambelos Linux - Software 2 02-24-2004 07:44 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:59 PM.

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