e.g., choose target backup drive by commandline parameter or by menu (listing all available drives / just all USB drives)?
like e.g., most simple:
Code: Select all
sudo ./backup /media/pi/usb120drv # usb120drv == drive name Code: Select all
sudo ./backup /media/pi/usb120drv # usb120drv == drive name Not one that fits the extremely narrow range of constraints that has been put on the problem...davenull wrote:is that true that for the RPi there is no single backup-program or script or what ever which works out of the box?
Of course there are, from free to $$$$. rsync has already been mentioned as has dd'ing the partions.davenull wrote:that cannot - that MUST not be true!
How long does Linux and Unix already exist?
And NO BACKUP PROGRAM to a plugged-in USB drive available ?!?
Code: Select all
sudo tar --exclude=/media/* --exclude=/proc --exclude=/dev --exclude=/tmp --exclude=/run cvzf /media/pi/usb120drv/pibackup.tar.gz /Well, I did say that may have the alter the position of the excludes, try:davenull wrote:thank you!
neverless there is this error:
pi@raspberrypi:~ $ sudo tar --exclude=/media/* --exclude=/proc --exclude=/dev --exclude=/tmp --exclude=/run cvzf /media/pi/usb120drv/pibackup.tar.gz /
tar: Eine der Optionen „-Acdtrux“, „--delete“ oder „--test-label“ ist notwendig.
„tar --help“ oder „tar --usage“ gibt weitere Informationen.
...?
ps,
I'm a complete beginner and my English is very poor, especially I don't understand sort of slang like dd'ing :-/
rsync appears extremely complicated, except there is 1 single install programm for the whole installation (like setup.exe for windows programs)
and just 1 command to start (like double-click on sort of "rsync.exe"
and adjust the settings (like target drive) interactively.
Code: Select all
tar cvzf /media/pi/usb120drv/pibackup.tar.gz / --exclude=/media/* --exclude=/proc --exclude=/dev --exclude=/tmp --exclude=/run
They are psuedo-filesystems populated by the OS at runtime, they probably are empty on the SDcard (if they exist at all).davenull wrote: and why exclude proc and dev?
Try putting sudo in front of the tar command (as in my first example), or:davenull wrote:no,...
tar (child): /media/pi/usb120drv/pibackup.tar.gz: Funktion open fehlgeschlagen: Datei oder Verzeichnis nicht gefunden
tar (child): Error is not recoverable: exiting now
did not find the USB target drive
nevertheless, the USB drive is plugged in and can be accessed via the file explorer
Code: Select all
cd /media/pi/usb120drv/
sudo tar cvzf ./pibackup.tar.gz / --exclude=/media/* --exclude=/proc --exclude=/dev --exclude=/tmp --exclude=/runMine's just failed withdavenull wrote:but I don't find a tar file on my usb drv after that...
Google translate of error msgs:
tar (child): /media/pi/usb120drv/pibackup.tar.gz: fuction open failed
/etc/dhcpcd.duid/etc/rpi-issue no such file or directory
tar (child): Error is not recoverable: exiting now
Code: Select all
tar: Exiting with failure status due to previous errorsCode: Select all
-rw-r--r-- 1 root root 1473845343 Jan 2 22:52 pibackup.tar.gzCode: Select all
sudo apt-get install rsync -y
mkdir -p /media/pi/usb120drv/pibackup
cd /media/pi/usb120drv/pibackup/
sudo rsync -avz --delete --exclude /sys --exclude /tmp --exclude /proc --exclude /run --exclude /media/* / .I was using you previous example:davenull wrote:it does not find the target USB drv
pi@raspberrypi: $ cd /media
pi@raspberrypi:/media $ cd usb120drv
bash: cd: usb120drv: no such file or directory
pi@raspberrypi:/media $
Code: Select all
sudo ./backup /media/pi/usb120drv # usb120drv == dWhat does this command produce?davenull wrote:what is "mounted" ?
I plug it in and it is opened in the file manager..
I can see the file tree
\media\pi\usb120drv
Code: Select all
df -hUnix systems are case sensitive (unlike windows), so /media/pi/USB120DRV is not the same as /media/pi/usb120drvdavenull wrote:pi@raspberrypi:/media/pi $ df -h
/dev/sda1 112G 39G 74G 35% /media/pi/USB120DRV
pi@raspberrypi:/media/pi $
Code: Select all
mkdir -p /media/pi/USB120DRV/pibackup
cd /media/pi/USB120DRV/pibackup/
sudo rsync -avz --delete --exclude /sys --exclude /tmp --exclude /proc --exclude /run --exclude /media/* / .

yes.We actually thought of selling this to the Soviets to set their computer science
progress back 20 or more years.