Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Making dated dir's
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
beltazore
Apprentice
Apprentice


Joined: 30 Oct 2003
Posts: 174
Location: Norway

PostPosted: Sat Mar 19, 2005 10:21 am    Post subject: Making dated dir's Reply with quote

Hi,

I have made a very simple backup script using flexbackup.
Code:

#!/bin/bash
flexbackup -set all
cd /root/backup
scp * root@serv1:/backup/


I use /etc/flexbackup.conf for the backup options. After the backup is completed i scp all the backup files to my backupserver.

The thing is when i have used this script for a week, the backup folder on my server is very messy. Is it possible to make dated dirs with cron or simmilar? So every time i upload new files, they end up in a directory named the same as the date?
Back to top
View user's profile Send private message
Spinner_Kontrol
n00b
n00b


Joined: 16 Jan 2005
Posts: 6

PostPosted: Sat Mar 19, 2005 11:37 am    Post subject: Reply with quote

thought about doing something like:
`date +%Y%m%d-%H%M`-rest-of-filename into a tar so that it's all there in one???
Or better yet - why re-re-invent the wheel? I've done it once ;-)
take a look at this script I wrote - might help you out a little:
https://forums.gentoo.org/viewtopic-t-280450.html

you could call this script (or even your own, with modifications sourced from mine - ie. the date & tar calls) then scp that single (nicely dated) file to the backup server
Back to top
View user's profile Send private message
beltazore
Apprentice
Apprentice


Joined: 30 Oct 2003
Posts: 174
Location: Norway

PostPosted: Sat Mar 19, 2005 12:03 pm    Post subject: Reply with quote

Thanks, that gave me some ideas... Ill post the finished script here later.
Back to top
View user's profile Send private message
beltazore
Apprentice
Apprentice


Joined: 30 Oct 2003
Posts: 174
Location: Norway

PostPosted: Sat Mar 19, 2005 2:30 pm    Post subject: Reply with quote

here are the results:
https://forums.gentoo.org/viewtopic-t-310938.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum