Tiny Core Extensions > TCE Q&A Forum
How to create a simple backup file tcz?
bigpcman:
In the past I created custom backup file tce extensions by simply using tar and renaming the file to ".tce".
Now I would like to do the same thing (load files to RAM on boot) using the "new" approach in tc v2.8rc3.
I get how to use the copy2fs.flg and copy2fs.lst but I'm not clear on how to create the tcz. Are these the right steps?
--- Code: ---mkdir /tmp/package
cp all backup files to /tmp/package
cd /tmp/package
mksquashfs package backup_name.tcz
mv backup_name.tcz ../tce/optional
ln -s ../tce/backup_name.tcz ../tce/optional/backup_name.tcz
--- End code ---
curaga:
The ln command has them the wrong way around, it should be "ln target linkname".
Otherwise that's it.
bigpcman:
--- Quote from: curaga on January 17, 2010, 12:45:27 PM ---The ln command has them the wrong way around, it should be "ln target linkname".
Otherwise that's it.
--- End quote ---
I always seem to do that. Thanks
gerald_clark:
No, it is 'ln source destination'.
bigpcman:
--- Quote from: gerald_clark on January 17, 2010, 12:56:04 PM ---No, it is 'ln source destination'.
--- End quote ---
After thinking about it I missed an obvious part of the process. The backup files need to have destinations established via a list! So here's another crack at what I think is required:
--- Code: ---# Establish file backup list using tc builtin tool - add files one by one.
/usr/bin/add2file /tmp/backup_name.lst
# Create tar file from the list.
tar -C / -T /tmp/backup_name.lst -zcf /tmp/backup_name.tar.gz
mkdir /tmp/package
# unpack the tar in package/.
tar -xf /tmp/backup_name.tar.gz -C /tmp/package
# Create tcz file
mksquashfs /tmp/package backup_name.tcz
# Move the tcz and create link
mv /opt/package/backup_name.tcz ../tce/optional
ln -s ../tce/optional/backup_name.tcz ../tce/backup_name.tcz
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version