Click Here
home features news forums classifieds faqs links search
6196 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
22 crawler(s) on-line.
 95 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 DRiB:  17 mins ago
 MarisaG:  23 mins ago
 number6:  54 mins ago
 davidf215:  1 hr 20 mins ago
 matthey:  1 hr 57 mins ago
 AmigaMac:  2 hrs 37 mins ago
 RobertB:  3 hrs 3 mins ago
 Zeus:  3 hrs 20 mins ago
 kolla:  3 hrs 31 mins ago
 DiscreetFX:  3 hrs 51 mins ago

/  Forum Index
   /  Amiga OS4 Software
      /  Backup Script
Register To Post

PosterThread
fingus 
Backup Script
Posted on 2-Jan-2011 18:38:32
#1 ]
Cult Member
Joined: 20-Oct-2006
Posts: 747
From: Havixbeck / Germany

i wrote this small backup-script:

cd Workbench:
echo "Systembackup wird erstellt...."
lha -aezrx a Backup:Backup/Systembackup/backup_02_jan_2011.lha #?
echo "Systembackup fertig!"
cd Programme:Internet/Simplemail/.folders
echo "E-Mail-Backup wird erstellt...."
lha -aezrx a Backup:Backup/E-Mails/mails_02_jan_2011.lha #?
echo "E-Mail-Backup fertig!"

But how i can get a timestamp in amigados to fill it in to line 3 and 7?

_________________
I´m back in 2023 on Classic Amiga with my A1200/Blizzard1230IB@50Mhz, 32MB RAM, AmigaOS3.2 and ROMs, Indivision AGA MK3, Author of Amiga-Flipclock (OS4)

 Status: Offline
Profile     Report this post  
jPV 
Re: Backup Script
Posted on 2-Jan-2011 19:51:34
#2 ]
Cult Member
Joined: 11-Apr-2005
Posts: 840
From: .fi

Uhmm.. without any deeper thoughts, amigados date command doesn't seem too suitable for it, but maybe some dirty arexx addition would work... like:

rx "say space(date(),1,'_')" >env:backupdate
cd Workbench:
echo "Systembackup wird erstellt...."
lha -aezrx a Backup:Backup/Systembackup/backup_$backupdate.lha #?
echo "Systembackup fertig!"
cd Programme:Internet/Simplemail/.folders
echo "E-Mail-Backup wird erstellt...."
lha -aezrx a Backup:Backup/E-Mails/mails_$backupdate.lha #?
echo "E-Mail-Backup fertig!"

_________________
- The wiki based MorphOS Library - Your starting point for MorphOS
- Software made by jPV^RNO

 Status: Offline
Profile     Report this post  
swoodall 
Re: Backup Script
Posted on 2-Jan-2011 19:53:45
#3 ]
Regular Member
Joined: 17-Sep-2003
Posts: 248
From: Raleigh NC, USA

@fingus

The simplest way is probably to write the backup command to a temp file and run it, so

Quote:
cd Workbench:
echo "Systembackup wird erstellt...."
date lformat="lha -aezrx a Backup:Backup/Systembackup/backup_%d_%h_%Y.lha #?" to T:bdate{$$}
execute T:bdate{$$}
delete >NIL: T:bdate{$$} quiet
echo "Systembackup fertig! (hoffentlich)"

If I was going to rely on a script like this for backups, I would recommend some error checking and re-entrancy protection.

 Status: Offline
Profile     Report this post  
Severin 
Re: Backup Script
Posted on 2-Jan-2011 20:15:12
#4 ]
Elite Member
Joined: 18-Aug-2003
Posts: 2740
From: Gloucestershire UK

@fingus

Or try this:

set today `date lformat="%d_%m_%Y"`
cd Workbench:
echo "Systembackup wird erstellt...."
lha -aezrx a Backup:Backup/Systembackup/backup_{today}.lha #?
echo "Systembackup fertig!"
cd Programme:Internet/Simplemail/.folders
echo "E-Mail-Backup wird erstellt...."
lha -aezrx a Backup:Backup/E-Mails/mails_{today}.lha #?
echo "E-Mail-Backup fertig!"
unset today

Last edited by Severin on 02-Jan-2011 at 08:18 PM.

_________________
OS4 Rocks
X1000 beta tester, Sam440 Flex (733)

Visit the Official OS4 Support Site for more help.

It may be that your sole purpose is to serve as a warning to others.

 Status: Offline
Profile     Report this post  
fingus 
Re: Backup Script
Posted on 5-Jan-2011 20:58:40
#5 ]
Cult Member
Joined: 20-Oct-2006
Posts: 747
From: Havixbeck / Germany

Thanks for your help!

#2 is working perfectly!

_________________
I´m back in 2023 on Classic Amiga with my A1200/Blizzard1230IB@50Mhz, 32MB RAM, AmigaOS3.2 and ROMs, Indivision AGA MK3, Author of Amiga-Flipclock (OS4)

 Status: Offline
Profile     Report this post  
Deniil715 
Re: Backup Script
Posted on 6-Jan-2011 10:36:57
#6 ]
Elite Member
Joined: 14-May-2003
Posts: 4238
From: Sweden

@fingus

I find backing up to archives dangerous because if there is ever a bit error in the archive it could render the whole backup useless.

I myself use BackUp (www.onyxsoft.se) which makes a mirror copy of one directory to another without copying unchanged files. Such a backup is trivial to restore and easy to pick just any random file from even if the media had suffered damage. It also handles links so for example the SDK: could be backed up.

_________________
- Don't get fooled by my avatar, I'm not like that (anymore, mostly... maybe only sometimes)
> Amiga Classic and OS4 developer for OnyxSoft.

 Status: Offline
Profile     Report this post  
fingus 
Re: Backup Script
Posted on 6-Jan-2011 11:18:25
#7 ]
Cult Member
Joined: 20-Oct-2006
Posts: 747
From: Havixbeck / Germany

@Deniil715

Ouh, that sounds very good. I will test it, thanks for your TIP!

_________________
I´m back in 2023 on Classic Amiga with my A1200/Blizzard1230IB@50Mhz, 32MB RAM, AmigaOS3.2 and ROMs, Indivision AGA MK3, Author of Amiga-Flipclock (OS4)

 Status: Offline
Profile     Report this post  
fricopal! 
Re: Backup Script
Posted on 20-Mar-2025 2:46:25
#8 ]
Cult Member
Joined: 12-Mar-2025
Posts: 799
From: Unknown

Quote:
by Deniil715 on 6-Jan-2011 10:36:57

@fingus

I find backing up to archives dangerous because if there is ever a bit error in the archive it could render the whole backup useless.

I myself use BackUp (www.onyxsoft.se) which makes a mirror copy of one directory to another without copying unchanged files. Such a backup is trivial to restore and easy to pick just any random file from even if the media had suffered damage. It also handles links so for example the SDK: could be backed up.


BackUp creates an exact replica, allowing selective restoration without relying on potentially corrupted archives.

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle