LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-02-2015, 05:59 AM   #1
atux_null
Member
 
Registered: Mar 2015
Distribution: debian 12, ubuntu 22.04
Posts: 65

Rep: Reputation: Disabled
backup of folder created daily


hello everyone. i have a folder in /opt/backup that everyday there is a folder created. in order to save space i would like to tar.gz all folders that is older that 2 days.
i would not like to create one single file but each folder to be on its own, with the name preserved.
that script will run every 2 days at 02:00 in the morning.
 
Old 07-02-2015, 06:30 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,628

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Plan

I am not sure that there is any question in your post, I see nothing to answer.
I will comment:
That sounds like a plan, but why not backup any NEW folder (created since the last run, or in the last 24 hours) instead?
 
Old 07-02-2015, 08:29 AM   #3
binary_dreamer
Member
 
Registered: Feb 2006
Distribution: debian squeeze
Posts: 199

Rep: Reputation: 31
thanks a lot for the reply.
i do need to backup individually, every folder that is in /opt/backup and it is older than 2 days old.
i do need that script to run at 02:00 every 2 days.
my question is how do i do that, please?
 
Old 07-03-2015, 07:59 AM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,628

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
You want a process or algorythm?

What have you tried or considered so far?
 
Old 07-06-2015, 03:36 AM   #5
EmaRsk
Member
 
Registered: Mar 2006
Distribution: Mint, WSL Ubuntu
Posts: 134

Rep: Reputation: 32
Is this a school assignment? And why has the user changed?
 
Old 07-06-2015, 08:42 AM   #6
atux_null
Member
 
Registered: Mar 2015
Distribution: debian 12, ubuntu 22.04
Posts: 65

Original Poster
Rep: Reputation: Disabled
it is a group assignment for the office and my colleague wrote instead of me.
 
  


Reply



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
Server Reboot During Daily Backup Rahul77 Linux - Server 6 12-05-2014 12:39 AM
How to limit max. number of folder can be created inside a folder Winanjaya Linux - General 4 08-01-2013 05:47 AM
how can backup a remote server(only folder needed) with ftp ,daily backup? ahjafari Linux - Newbie 1 10-26-2011 04:04 PM
Sheduled daily backup in linux ramecare Linux - Server 5 03-31-2011 04:07 PM
Need a script for daily backup of oracle archive file sathyguy Linux - Newbie 15 01-22-2007 06:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:00 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration