ARM Support

Thank you. It went further but... there are now plenty of errors with proxmox-backup compilation... :-(

Code:
   Compiling proxmox-backup v1.0.6 (/usr/src/proxmox-backup)
error: additional properties not allowed on external type
   --> src/api2/tape/media.rs:239:17
    |
239 |                 flatten: true,
    |                 ^^^^^^^

error[E0432]: unresolved import `proxmox::api::ParameterSchema`
  --> src/server/rest.rs:29:5
   |
29 |     ParameterSchema,
   |     ^^^^^^^^^^^^^^^ no `ParameterSchema` in `api`

error[E0432]: unresolved import `proxmox::api::schema::ObjectSchemaType`
  --> src/server/rest.rs:36:5
   |
36 |     ObjectSchemaType,
   |     ^^^^^^^^^^^^^^^^
   |     |
   |     no `ObjectSchemaType` in `api::schema`
   |     help: a similar name exists in the module: `ObjectSchema`

error[E0432]: unresolved import `proxmox::tools::fd::BorrowedFd`
  --> src/pxar/dir_stack.rs:11:5
   |
11 | use proxmox::tools::fd::BorrowedFd;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `BorrowedFd` in `tools::fd`

error[E0432]: unresolved import `proxmox::api::router::ReturnType`
  --> src/api2/admin/datastore.rs:18:28
   |
18 | use proxmox::api::router::{ReturnType, SubdirMap};
   |                            ^^^^^^^^^^ no `ReturnType` in `api::router`

error[E0432]: unresolved import `proxmox::tools::future`
  --> src/client/http_client.rs:21:12
   |
21 |     tools::future::TimeoutFutureExt,
   |            ^^^^^^ could not find `future` in `tools`

error[E0425]: cannot find value `API_METHOD_LIST_CONTENT` in this scope
   --> src/api2/tape/media.rs:333:19
    |
56  | pub async fn list_media(pool: Option<String>) -> Result<Vec<MediaListEntry>, Error> {
    | --------- similarly named constant `API_METHOD_LIST_MEDIA` defined here
...
333 |             .get(&API_METHOD_LIST_CONTENT)
    |                   ^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `API_METHOD_LIST_MEDIA`

error[E0599]: no method named `or_timeout_err` found for struct `hyper::client::ResponseFuture` in the current scope
   --> src/client/http_client.rs:719:14
    |
719 |             .or_timeout_err(HTTP_TIMEOUT, format_err!("http request timed out"))
    |              ^^^^^^^^^^^^^^ method not found in `hyper::client::ResponseFuture`

error[E0599]: no method named `or_timeout_err` found for struct `hyper::client::ResponseFuture` in the current scope
   --> src/client/http_client.rs:637:14
    |
637 |             .or_timeout_err(HTTP_TIMEOUT, format_err!("http upgrade request timed out"))
    |              ^^^^^^^^^^^^^^ method not found in `hyper::client::ResponseFuture`

error[E0599]: no method named `or_timeout_err` found for struct `hyper::client::ResponseFuture` in the current scope
   --> src/client/http_client.rs:567:14
    |
567 |             .or_timeout_err(HTTP_TIMEOUT, format_err!("http download request timed out"))
    |              ^^^^^^^^^^^^^^ method not found in `hyper::client::ResponseFuture`

error[E0599]: no method named `into_raw_fd` found for type `i32` in the current scope
  --> src/tools/logrotate.rs:52:52
   |
52 |         let target = unsafe { File::from_raw_fd(fd.into_raw_fd()) };
   |                                                    ^^^^^^^^^^^ method not found in `i32`

error[E0599]: no method named `skip_to_end` found for struct `std::boxed::Box<dyn tape::tape_read::TapeRead>` in the current scope
   --> src/tape/drive/mod.rs:112:23
    |
112 |             if reader.skip_to_end()? != 0 {
    |                       ^^^^^^^^^^^ method not found in `std::boxed::Box<dyn tape::tape_read::TapeRead>`

error[E0599]: no method named `skip_to_end` found for struct `std::boxed::Box<dyn tape::tape_read::TapeRead>` in the current scope
   --> src/tape/drive/mod.rs:135:19
    |
135 |         if reader.skip_to_end()? != 0 {
    |                   ^^^^^^^^^^^ method not found in `std::boxed::Box<dyn tape::tape_read::TapeRead>`

error[E0599]: no method named `read_exact_or_eof` found for struct `std::io::BufReader<&mut std::fs::File>` in the current scope
   --> src/tape/media_catalog.rs:560:28
    |
560 |                 match file.read_exact_or_eof(&mut magic) {
    |                            ^^^^^^^^^^^^^^^^^ method not found in `std::io::BufReader<&mut std::fs::File>`

error[E0599]: no method named `read_exact_or_eof` found for struct `std::io::BufReader<&mut std::fs::File>` in the current scope
   --> src/tape/media_catalog.rs:573:24
    |
573 |             match file.read_exact_or_eof(&mut entry_type) {
    |                        ^^^^^^^^^^^^^^^^^ method not found in `std::io::BufReader<&mut std::fs::File>`

error[E0599]: no method named `read_exact_or_eof` found for type parameter `R` in the current scope
   --> src/tape/chunk_archive.rs:179:27
    |
179 |         match self.reader.read_exact_or_eof(data) {
    |                           ^^^^^^^^^^^^^^^^^ method not found in `R`

warning: unused import: `IntoRawFd`
--> src/tools/logrotate.rs:3:36
  |
3 | use std::os::unix::io::{FromRawFd, IntoRawFd};
  |                                    ^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `AsRawFd`
--> src/pxar/dir_stack.rs:2:25
  |
2 | use std::os::unix::io::{AsRawFd, RawFd};
  |                         ^^^^^^^

error: aborting due to 16 previous errors; 2 warnings emitted

Some errors have detailed explanations: E0425, E0432, E0599.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `proxmox-backup`.

To learn more, run the command again with --verbose.

you are not using the current proxmox crate..
 
Hi,
is there any news about availability for ARM architecture?
I would like to use my "QNAP TS-231P" NAS system to run PBS in a container environment, though the cpu is "Annapurna Labs Alpine AL212 DualCore". Any chance in getting this to run? I think it would be great to use a standalone device as backup server.

Thanks Proxmox team and keep up the great work ;)

Greetings,
stewen
 
Last edited:
@ayufan thank you for sharing!

Has anyone tried it on a raspberry pi? Maybe even on a 3b+ with only 1GB of Ram?
Is the write wear caused by the logs equally to PVE?
 
@ayufan thank you for sharing!

Has anyone tried it on a raspberry pi? Maybe even on a 3b+ with only 1GB of Ram?
Is the write wear caused by the logs equally to PVE?
I did not try it on RPI 3. I run it all the time on `RockPro64`. It will not work on 3b+, as it requires ARM64 (it is only compiled for this). So, Rock64, RockPro64, RPI4, RockPi4, etc.

About logs, they can be redirected to `tmpfs` (via docker compose tmpfs volume) to avoid write wear.
 
Yes thats the easy way. But what when you decide to not update your packages anymore?
furthermore i don't use docker in any way ;)
 
Yes thats the easy way. But what when you decide to not update your packages anymore?
furthermore i don't use docker in any way ;)

Well, it is not hard to compile, and all details how to do it are public. I primarily use it as a server, and actually have pretty long history of upgrading packages ;)
 
WIth the instructions above and a little tweaking, I installed proxmox-backup-client on Ubuntu 20.04 LTS arm64 on a Raspberry PI 4:

Bash:
# get and install rust
curl https://sh.rustup.rs -sSf | sh

# get and install required dependencies
apt install libclang-dev llvm gcc g++ clang-7 libacl1-dev libpam-dev libfuse3-dev python-docutils python3-sphinx libudev-dev libssl-dev pkg-config patchelf

# link libraries with mismatched names
cd /usr/lib/aarch64-linux-gnu/
ln -s libsgutils2.so.2.0.0 libsgutils2.so
ln -s libuuid.so.1 libuuid.so

# get source and patch it (patches were for Arch but also work on Ubuntu)
cd /usr/src
git clone https://git.proxmox.com/git/proxmox-backup.git --branch=v1.1.3
cd proxmox-backup
wget "https://aur.archlinux.org/cgit/aur.git/plain/0001-adapt-cargo-toml-and-remove-systemd-linking.patch?h=proxmox-backup-client"
wget "https://aur.archlinux.org/cgit/aur.git/plain/0002-remove-apt-dependency.patch?h=proxmox-backup-client"
wget "https://aur.archlinux.org/cgit/aur.git/plain/0003-server-rest-fix-new-type-ambiguity.patch?h=proxmox-backup-client"
wget "https://aur.archlinux.org/cgit/aur.git/plain/elf-strip-unused-dependencies.sh?h=proxmox-backup-client" -O elf-strip-unused-dependencies.sh
patch --forward --strip=1 --input="0001-adapt-cargo-toml-and-remove-systemd-linking.patch?h=proxmox-backup-client"
patch --forward --strip=1 --input="0002-remove-apt-dependency.patch?h=proxmox-backup-client"
patch --forward --strip=1 --input="0003-server-rest-fix-new-type-ambiguity.patch?h=proxmox-backup-client"
rm src/api2/node/apt.rs src/tools/apt.rs src/bin/proxmox-daily-update.rs

# build and install the binaries
cargo build --release --bin proxmox-backup-client --bin pxar --bin dump-catalog-shell-cli
bash elf-strip-unused-dependencies.sh target/release/proxmox-backup-client
bash elf-strip-unused-dependencies.sh target/release/pxar
install -Dm755 "target/release/proxmox-backup-client" "/usr/local/bin/proxmox-backup-client"
install -Dm755 "target/release/pxar" "/usr/local/bin/pxar"

# build and install the docs
cd docs
BUILD_MODE=release make proxmox-backup-client.1 pxar.1
install -Dm644 "proxmox-backup-client.1" "/usr/local/share/man/man1/proxmox-backup-client.1"
install -Dm644 "pxar.1" "/usr/local/share/man/man1/pxar.1"
 
It was not easy, but I was able to compile client for arm32 and run it on: Raspberry PI 2 / 4 (both using armv7l) and Turris Omnia.

https://github.com/ayufan/pve-backu....1.9/proxmox-backup-client-v1.1.9-arm32v7.tgz

Patchset here: https://github.com/ayufan/pve-backup-server-dockerfiles/tree/master/versions/v1.1.9/client-arm32v7
After run cron.daily on Pi 2 I've got
Error: unable to parse repository url 'DB0906@pbs001.tuxis.nl:DB0906_easter'
What could have gone wrong?
 
Error: unable to parse repository url 'DB0906@pbs001.tuxis.nl:DB0906_easter'
What could have gone wrong?
well, as the error indicates your passing a bad formatted PBS repository URL, to be specific, there's a @ missing between user id and server, should probably be: DB0906@pbs@001.tuxis.nl:DB0906_easter
 
well, as the error indicates your passing a bad formatted PBS repository URL, to be specific, there's a @ missing between user id and server, should probably be: DB0906@pbs@001.tuxis.nl:DB0906_easter
I made!
The var PBS_REPOSITORY should be ='USER@REALM@SERVER:STORAGE' right?

In my case DB0906@pbs@pbs001.tuxis.nl:DB0906_easter
It works! Thank you!
 
Last edited: