View previous topic :: View next topic |
Author |
Message |
beltazore Apprentice
Joined: 30 Oct 2003 Posts: 174 Location: Norway
|
Posted: Sat Mar 19, 2005 10:21 am Post subject: Making dated dir's |
|
|
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 |
|
|
Spinner_Kontrol n00b
Joined: 16 Jan 2005 Posts: 6
|
Posted: Sat Mar 19, 2005 11:37 am Post subject: |
|
|
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 |
|
|
beltazore Apprentice
Joined: 30 Oct 2003 Posts: 174 Location: Norway
|
Posted: Sat Mar 19, 2005 12:03 pm Post subject: |
|
|
Thanks, that gave me some ideas... Ill post the finished script here later. |
|
Back to top |
|
|
beltazore Apprentice
Joined: 30 Oct 2003 Posts: 174 Location: Norway
|
|
Back to top |
|
|
|