|
Backing Up and Restoring ARS Tables |
arsbackup copies tables into backup files, and arsrestore rebuilds the tables from
them. A backup can be taken while programs are using the tables. The examples on this page use a
folder, c:\ars_demo, holding copies of two sample tables, client and
vendor, in its data folder.
Name the folder that holds the tables, then the folder the backup goes into. The backup folder must already exist.
cd c:\ars_demo arsbackup data backups "nightly" STATS
ARSBACKUP V11.028
Preparing backup of C:\ars_demo\data\client.ars, cache size 10432512 bytes
Preparing backup of C:\ars_demo\data\client.def
Preparing backup of C:\ars_demo\data\client.str
Preparing backup of C:\ars_demo\data\vendor.ars, cache size 10432512 bytes
Preparing backup of C:\ars_demo\data\vendor.def
Preparing backup of C:\ars_demo\data\vendor.str
--Backup started 08-Nov-2026 04:13:12 -- Number of files: 6
Successful backup of C:\ars_demo\data\client.ars
to C:\ars_demo\backups\client.ARS_BACKUP
Stats for C:\ars_demo\data\client.ars
Bkts backed up: 1 Bkts already done: 0
Bkts in order: 1 Bkts out of order: 0
Successful backup of C:\ars_demo\data\client.str
to C:\ars_demo\backups\client.str
Successful backup of C:\ars_demo\data\client.def
to C:\ars_demo\backups\client.def
Successful backup of C:\ars_demo\data\vendor.str
to C:\ars_demo\backups\vendor.str
Successful backup of C:\ars_demo\data\vendor.ars
to C:\ars_demo\backups\vendor.ARS_BACKUP
Stats for C:\ars_demo\data\vendor.ars
Bkts backed up: 10 Bkts already done: 0
Bkts in order: 10 Bkts out of order: 0
Successful backup of C:\ars_demo\data\vendor.def
to C:\ars_demo\backups\vendor.def
Files with errors: 0
--Backup completed 08-Nov-2026 04:13:12
client.ars (559,616 bytes) became a 3,072-byte backup, and vendor.ars
(527,872 bytes) one of 241,664 bytes..str and
.def files are in the backup too.STATS, for the bucket counts shown above. To get the counts,
give a description first: a third word is always taken as the description.
Programs can keep reading and changing the tables while arsbackup runs, and each backup is a
complete, consistent copy of its table. A program that writes to a table during its backup runs more slowly
until the backup ends, so schedule backups for a quiet time of day: in Windows Task Scheduler, or with
cron on Linux.
arsbackup data\client,data\vendor backups.
Only the tables are copied then, not their .str and .def files.arsbackup data\v* backups backs up every table whose name
starts with v.data\client,data\vendor backups_from_list
arsbackup -include backup_list.txt
arsrestore takes the backup files and the folder to rebuild the tables in. It adds every
record again and builds the keys new, and it copies the other files back as they are.
arsrestore backups restored
ARSRESTORE V11.028
Preparing restore of C:\ars_demo\backups\client.ars_backup
Preparing restore of C:\ars_demo\backups\client.def
Preparing restore of C:\ars_demo\backups\client.str
Preparing restore of C:\ars_demo\backups\vendor.ars_backup
Preparing restore of C:\ars_demo\backups\vendor.def
Preparing restore of C:\ars_demo\backups\vendor.str
--Restore started 08-Nov-2026 04:13:12 -- Number of files: 6
Restored C:\ars_demo\backups\client.str
to: C:\ars_demo\restored\client.str
Restored C:\ars_demo\backups\client.def
to: C:\ars_demo\restored\client.def
Restored C:\ars_demo\backups\vendor.str
to: C:\ars_demo\restored\vendor.str
Restored C:\ars_demo\backups\vendor.def
to: C:\ars_demo\restored\vendor.def
Restored C:\ars_demo\backups\client.ars_backup
to: C:\ars_demo\restored\client.ARS
Restored C:\ars_demo\backups\vendor.ars_backup
to: C:\ars_demo\restored\vendor.ARS
Files SUCCESSFUL: 6
Files with ERRORS and DELETED: 0
--Restore completed 08-Nov-2026 04:13:12
Then check the restored tables. arschk with -count counts the records quickly:
arschk restored\vendor -count
... Records: 1383 ARSCHK finished: SUCCESSFUL Validation of restored\vendor.ars
The next page, Checking and Repairing ARS Tables, explains arschk's report.
arsrestore replaces a table of the same name in the folder without asking. Restore into an
empty folder, check the tables there, and copy them into place at a time when no program is using them.
arsrestore backups\client restored (the .ARS_BACKUP is
assumed).-stats adds the restore's speed and cache figures; -continue keeps adding
records after one that fails. Typed alone, arsrestore lists the rest of its options, most of
them for speed.arsbackup data backups backs up every table in a folder, plus its other files, into an
existing backup folder.arsrestore backups restored rebuilds the tables, keys and all.arschk before putting them in
place.|
Hide Description
|
|
|
Enter or modify the code below, and then click on RUN |
|
Looking for the full power of Sheerpower?
Check out the Sheerpower website. Free to download. Free to use. |